Measuring Law Over Time: A Network Analytical Framework with an Application to Statutes and Regulations in the United States and Germany

How do complex social systems evolve in the modern world? This question lies at the heart of social physics, and network analysis has proven critical in providing answers to it. In recent years, network analysis has also been used to gain a quantitative understanding of law as a complex adaptive system, but most research has focused on legal documents of a single type, and there exists no unified framework for quantitative legal document analysis using network analytical tools. Against this background, we present a comprehensive framework for analyzing legal documents as multi-dimensional, dynamic document networks. We demonstrate the utility of this framework by applying it to an original dataset of statutes and regulations from two different countries, the United States and Germany, spanning more than twenty years (1998-2019). Our framework provides tools for assessing the size and connectivity of the legal system as viewed through the lens of specific document collections as well as for tracking the evolution of individual legal documents over time. Implementing the framework for our dataset, we find that at the federal level, the United States legal system is increasingly dominated by regulations, whereas the German legal system remains governed by statutes. This holds regardless of whether we measure the systems at the macro, the meso, or the micro level.


INTRODUCTION
Originating from mathematics and physics, complexity science has been successfully applied in the study of social phenomena [1,2]. More recently, it was introduced as an approach to gain a quantitative understanding of the structure and evolution of law [3]. While legal scholars have long used concepts and terminology from complexity science in legal theory [4][5][6], research has also called for the development of computational models, methods, and metrics to describe how law evolves in practice [7].

Measuring Law Over Time
as well as from statutes [27][28][29][30][31][32][33], constitutions [34][35][36], and international treaties [37][38][39][40][41]. Relevant work in this context explored, for example, which characteristics of complex systems occur in statutory law [27,30,31], how references to judicial decisions are used to shape legal arguments [13,14,20], or where social dynamics exist between judges or international arbitrators [26,42]. The network analytical methods employed include centrality measures, clustering, and degree distributions [11,12,27,34,38]. However, while all studies examine network representations of legal document collections, the data models and methods employed vary widely, which makes it hard to assess the quality of individual results and compare findings across studies. Furthermore, most of this research considers one legal document type only, and some important categories of legal documents, most prominently regulations (i.e., rules promulgated by the executive branch of government with authorization of the legislative branch of government), have-to the best of our knowledge-not received any network analytic attention.
This points to two gaps in the literature: First, on the methodological side, there exists no comprehensive framework for quantitative legal document analysis using network analytical tools. Such a framework should be flexible in three ways: It should (1) produce sensible results for different document types, countries, and time periods, (2) allow us to explore document collections of vastly different sizes, and (3) offer insights on the global (macro), intermediate (meso), and local (micro) level of analysis. Second, on the empirical side, there is a lack of studies that combine multiple legal document types or include regulations.
In this article, we take a step toward filling both gaps. We offer a comprehensive framework for analyzing legal documents as multi-dimensional, dynamic document networks and demonstrate its utility by applying it to an original dataset of statutes and regulations from two different countries, the United States and Germany, that spans more than twenty years . Our framework provides tools for assessing the size and connectivity of the legal system as viewed through the lens of specific document collections as well as for profiling individual legal documents over time. It goes beyond the existing literature, inter alia, by adapting network analytical methods to the peculiarities of legal documents, allowing the joint examination of multiple document types, and enabling temporal analysis. Implementing the framework for our dataset, we find that the United States legal system is increasingly dominated by regulations, whereas the German legal system remains governed by statutes, regardless of whether we measure the systems at the macro, the meso, or the micro level.
The remainder of the paper is structured as follows. In Section 2, we specify our network model of legal documents and detail how we instantiate it to analyze statutes and regulations in the United States and Germany. Section 3 describes our methodological framework, and the results of applying this framework to our original dataset are presented in Section 4. We conclude by discussing the strengths and weaknesses of our approach in Section 5, where we also identify avenues for future research. Our exposition uses the basic terminology of graphs and networks; for textbook introductions, see [43][44][45].

DATA
In this section, we introduce our network model of legal documents (2.1) and instantiate it for our original dataset (2.2).

Data Model Specification
As visualized in Figure 1 (a), the legal system consists of multiple levels: the local (e.g., municipal) level, the intermediate (e.g., state or province) level, the national (e.g., federal) level, and the supranational (including international) level. Horizontally, it is usually subdivided into the legislative, executive, and judicial branches of government. These public parts are framed by the private sector, which operates on all   (1). Two-dimensional overview of the legal system (left) and dependencies between its typical outputs (right), with the areas covered by the dataset introduced in this work highlighted in grey. The legal outputs in Panel (b) are (clockwise from the top left and in reverse topological order) Statutes, Regulations, Administrative Acts, Contracts, (Court) Decisions, and (Scholarly) Publications. The arrows illustrate typical dependencies between the document types, e.g., through explicit references (although in reality, most dependencies can be bidirectional, e.g., some courts also cite legal scholarship). Note that the sources covered by our dataset lie at the end of all typical dependency chains (i.e., statutes and regulations are last in the topological order of the dependency graph).   (1). Overview of agents and outputs in the legal system. levels, and the research community, which studies all parts of the legal system (including itself [46][47][48][49][50]). In all parts of the legal system, agents of varying sizes produce different types of outputs that create, modify, delete, apply, debate, or evaluate legal rules. These agents and their typical outputs are summarized in Table 1.

Branch of Government
As the agents interact, they consciously interconnect their outputs. For example, court decisions regularly contain references to statutes, regulations, contracts, and other court decisions. Figure 1 (b) gives an Figure (2). Our legal network data model (adapted from [27]), illustrated for a dummy graph containing one statute and one regulation: initial configuration (left) and potential edit operations (right).
overview of the classic dependencies between the typical outputs of agents in the legal system. It illustrates that the documented part of the legal system constitutes a multilayered document network, which is changing over time as the agents continue producing or amending their outputs. Since the connections between the legal documents are placed deliberately by the agents, they encode valuable information about the content and the context of these documents. A lot of this information cannot be inferred from the documents' language alone (reliably or at all). Therefore, investigating the dynamic document network representation of a legal system using network analytical tools promises insights into its structure and evolution that would be hard or impossible to obtain via other methods.
To perform network analysis of a dynamic network of legal documents, we need to represent it as a series of graphs. Here, we build on a generalizable network model of statutory materials [27] and exploit that the typical outputs listed in Table 1 have three common features (beyond the obvious characteristic that they all contain text): 1. They are hierarchically structured (hierarchy).
2. Their text is placed in containers that are sequentially ordered and can be sequentially labeled (sequence). 3. Their text may contain explicit citations or cross-references (henceforth: references) to the text in other legal documents or in other parts of the same document (reference).
Therefore, each document at a given point in time (henceforth: snapshot) is represented as a (sub)graph, with its hierarchy modeled as a tree using hierarchy edges. We capture a document's reference using reference edges at the level corresponding to the document's sequence, which, inter alia, avoids that the graph induced by these references becomes too sparse (thereby eliminating some noise in the data and facilitating its analysis). The result is a directed multigraph, as illustrated in Figure 2 for documents that are statutes or regulations (whose sequence level is the section level). Depending on the analytical focus, other edge types can be included (e.g., authority edges pointing from regulations to statutes can indicate which statutes delegated the rule-making power used to create which regulations), and depending on the document types considered, different types of edit operations are possible (e.g., court decisions and scholarly articles are only seldom changed after their initial publication), but the general model applies to all outputs listed in Table 1.

Data Model Instantiation
To illustrate the power of the methodological framework laid out in Section 3 and produce the results presented in Section 4, we instantiate the data model described in Section 2.1 with the outputs of the legislative and executive branches of government at the national level in the United States and Germany, i.e., federal statutes and regulations, over the 22 years from 1998 to 2019 (inclusive). The rules contained in these sources are universally binding and directly enforceable through public authority (the combination of which distinguishes them from the other outputs listed in Table 1). In the United States and Germany, they are arranged into edited collections: the United States Code (USC) and the Code of Federal Regulations (CFR) in the United States, and the federal statutes and federal regulations (which have no special name) in Germany. These collections are actively maintained to reflect the latest consolidated state of the law (though, in the United States, the consolidation may lag several years behind the actual law). As such, they are a best-effort representation of all universally binding and directly enforceable rules at the federal level in their country at any point in time, commonly referred to as codified law.
For the United States, we obtain the annual versions (reflecting the state of the codified law at the end of the respective year) of the United States Code (USC) and the Code of Federal Regulations (CFR) from the United States Office of the Law Revision Council 1 and the United States Government Publishing Office 2 , respectively. For Germany, we create a parallel set of annual snapshots for all federal statutes and regulations in effect at the end of the year in question based on documents from Germany's primary legal data provider, juris GmbH. 3 These data sources are the most complete presently available, but they may still be incomplete. They also reflect choices made by and events affecting the agents in charge of their maintenance, e.g., varying rates and orders of updates, purposeful or unintentional omissions or modifications, and changes in the agents' composition (e.g., as a consequence of elections).
We perform several preprocessing steps on the raw input data, detailed in the Supplementary Information (SI), to extract the hierarchy, sequence, and reference structure contained in each collection. The results are directed multigraphs, one per country and year, akin to those illustrated in Figure 2. These graphs contain all structural elements of the USC and the CFR (in the United States) or the federal statutes and regulations (in Germany) as nodes and all direct inclusion relationships (hierarchy) and atomic references (reference) as edges, where the references are resolved to the section level (sequence). Each graph represents the codified law of a particular country in a particular year, containing documents of two document types (statutes and regulations) at the federal level.
When modeling codified law as just described, we take a couple of design decisions that limit the scope of the results presented in Section 4. First, we focus on codified law, i.e., law in books, excluding other legal materials listed in Table 1, especially those representing law in action (in the sense of [51]), or even other representations of legislative materials such as the United States Statutes at Large or the German Federal Law Gazette (Bundesgesetzblatt). These materials all merit investigation, and they need to be included in an all-encompassing assessment of the legal system. Our current work also serves as a preparatory step toward realizing this larger vision.
Second, we extract atomic and explicit references that follow a specified set of common patterns only, i.e., references including-in a typical format-a particular section (called "Paragraph" or "Artikel" in German law), a list of sections, or a range of sections. With this procedure, we exclude container references (e.g., Differentiation of reference types for a document collection containing two types of documents: statutes and regulations. Light grey squares marked S represent sections of statutes, dark grey circles marked R represent sections of regulations. Given that statutes stand above regulations in the hierarchy of legal rules, a reference from a statute to a regulation is downward (silver), a reference from a regulation to a statute is upward (light blue), and references between documents of the same type are lateral (black and blue).
all years). For the token counts, we concatenate the text of all materials for one snapshot and document type and split on whitespace characters. For a given document type, the structural element counts reflect the number of nodes of that type, and the reference counts reflect the number of reference edges between nodes of that type in our graphs. These measures give a first, high-level idea of how the legal system evolves, and the aggregation by document type allows us to uncover, e.g., differences in growth rates.
To explore the relevance of references between documents of different types, if the document collection contains x types of documents, we distinguish between x 2 types of references. Figure 3 illustrates the idea for x = 2 with statutes and regulations as document types. We count the number of references of each type for each temporal snapshot.
Raw reference counts do not show how the incoming and outgoing references are distributed across the individual sequence-level items. The user experience of a legal system, however, depends crucially on these distributions: If the typical item on the sequence level has very few outgoing references, the expected cost of navigating the law is much smaller than if the outgoing references are uniformly distributed, and if the distribution of incoming references is very skewed, when reading the law, we are much more likely to pass a few prominent sequence-level items than a large number of less prominent ones (of course, the actual cost of the user also depends on the size of the items to be navigated, which can vary widely, e.g., amongst the sections in the USC). Therefore, we inspect the evolution of the in-degree distribution and the out-degree distribution of the subgraph induced by the reference edges. We compute these distributions separately for each combination of reference edge types (e.g., considering any combination of the reference types depicted in Figure 3 for a document collection containing statutes and regulations) and across all snapshots. This allows us to evaluate whether growth in the number of references further amplifies differences in the prominence of different parts of the law, which would be reflected in a lengthening or thickening of the distributions' tails, and to assess how this affects the navigability of a legal system.

Connectivity
When exploring the connectivity of the legal system over time, we distinguish between macro-level connectivity (3.2.1), meso-level connectivity (3.2.2), and micro-level connectivity (3.2.3).

Macro-level connectivity
Investigating connectivity at the macro level helps us understand how information in the legal system is organized and processed. As the basis of all analyses, we consider the graph induced by the structural items on the documents' sequence level (referred to as seqitems in [27]) as nodes and the references between them as edges. For each snapshot, we count the number of non-trivial connected components (i.e., components with more than one node). Furthermore, we compute the fraction of nodes in the largest (weakly) connected component, the fraction of nodes in satellites, i.e., non-trivial components that are not the largest connected component, and the fraction of isolated nodes. We do this for the graph containing nodes of all document types as well as for the graphs containing only nodes of a single document type. These statistics provide a high-level overview of the system's information infrastructure and how it changes over time, and they enable a differentiated assessment of the role of documents of different types.
For a more detailed picture, we draw on concepts introduced in the study of the Web graph [52], which have also proven useful in the analysis of complex and self-organizing systems, e.g., in biology [53][54][55]. More precisely, we analyze the largest connected component of each of the sequence-level reference graphs, tracking the fraction of nodes contained in its strongly connected component, its in-only component (i.e., the nodes which can reach to but cannot be reached from the strongly connected component), its out-only component (i.e., the nodes which can be reached from but cannot reach to the strongly connected component), and its tendrils and tubes (whatever remains), again across all snapshots. We ask to which extent the legal system has a bowtie structure (i.e., a small strongly connected core joined by larger in-only and out-only components), which has been associated with "effective trade-offs among efficiency, robustness and evolvability" [54], inter alia, in complex biological systems, and whether any empirical deviations from that structure are characteristic of legal information processing.

Meso-level connectivity
One fundamental question concerning a legal system's connectivity at the meso level is how it selforganizes into areas of law. Existing taxonomies categorizing the law into distinct fields are largely based on tradition (e.g., the titles of the USC) or intuition (e.g., the thematic categories used by some legal database providers). Exploiting the connectivity provided by references between legal documents at the meso level, network analytical methods provide an alternative, data-driven approach to mapping the law. To implement such an approach, we follow a multi-step procedure: 1. We preprocess the graphs for each snapshot by taking the quotient graph at the granularity we are interested in (e.g., at the level of individual chapters for an analysis of the USC and the CFR). That is, we remove all nodes above and below that level and reroute all references outgoing from or incoming to a lower-level node to the node's unique ancestor that lies on the level of interest. 2. We cluster each of the undirected versions of the graphs from Step 1 separately using the Infomap algorithm [56,57] with a parametrization that mirrors domain knowledge, and passes sensitivity and robustness checks. Leveraging the randomness inherent in this algorithm, we increase the robustness of the clustering for each graph by computing the consensus clustering [58] of 1000 Infomap runs with different seeds, where two nodes are put into the same cluster if they are in the same cluster in 95 % of all runs. We choose the Infomap algorithm as our clustering algorithm because it is scalable, has a solid information-theoretic foundation, and mirrors the process in which users like lawyers navigate law (inter alia, by identifying a relevant section of a statute, reading that section, then potentially following a reference).
3. We compute pairwise alignments between the clusterings of all temporally adjacent snapshots based on the nodes of the unpreprocessed graphs that wrap text (for details on our alignment procedure, see Section 4.3.1 in the SI). This is most relevant for collections containing documents that can change over time (e.g., statutes and regulations), and it allows us to assess, inter alia, what amount of text from a cluster A in year y is contained in a cluster B in year y + 1. 4. We use the clusterings from Step 2 and the alignments from Step 3 to define a cluster family graph as introduced in [27]. This graph contains all clusters from all snapshots as nodes, and two clusters A and B are connected by a (weighted) edge if A lies in snapshot y, B lies in snapshot y + 1, at least p % of the tokens from A are contained in B, and at least p % of the tokens from B are contained in A, where p is chosen based on the analytical resolution we are interested in. 5. We define a cluster family as a connected component in a cluster family graph from Step 4 and compute, for each cluster family in each year, the number of tokens it contains from each document type.
This process is a variant of the family graph construction developed for statutes in [27], with the modification that we now allow for input data containing documents of different types. It results in a dynamic, datadriven map of the legal system that accounts for the information provided by the references between its documents.

Micro-level connectivity
At the micro level, the connectivity created by references allows us to assess the roles of individual units of law. Regardless of the level at which we aggregate the references between documents, the shapes of the nodes' neighborhoods at that level contain valuable information about their function in the legal system. This information is partly accounted for in the meso-level connectivity assessment, which leverages local density. While local density can help us find out which nodes interact strongly, local sparsity lets us identify nodes that play a particularly prominent role for the information flow in the network: If a node's neighbors are themselves only very sparsely connected (i.e., their neighbors almost form an independent set), the node provides an important bridge between them. We call the ego graph of such a node a star, with the node as its hub and the node's neighbors as the spokes.
In directed graphs, we can classify stars according to the ratio between the hub's in-degree and the hub's out-degree as depicted in Figure 4. More precisely, we define the type of a star s with hub v as follows: is v's in-degree. In the legal system, the type of a star captures the hub's role in mediating the information flow in its neighborhood.
To identify and classify stars in the legal system at the documents' sequence level, for each snapshot, we create the ego graph for each node v in the graph induced by the reference edges (where we exclude parallel edges). We then iteratively remove the node w that is connected to most of v's neighbors while w is connected to more than 5 % of v's neighborhood (excluding w), and keep the ego graph if it has a certain minimum size determined by the size of the collection (e.g., 10 nodes for collections with several thousands of items on the sequence level). The stars produced in this way contain no spoke that is connected to more than 5 % of the other spokes, and we classify them to identify those sequence-level items that are vital Coupette et al.

Sink
Hinge Source Figure (4). Star types. If the hub's in-degree is at least ten times its out-degree, the star is a sink. If the hub's out-degree is at least ten times its in-degree, the star is a source. Otherwise, the star is a hinge.
to the information flow in their neighborhoods and to describe the type of mediation they perform. To find stars at levels above the documents' sequence level, we can apply the methodology just described on graphs that aggregate references at those levels (e.g., on the quotient graphs described in Section 3.2.2).

Profiles
To assess the evolution of individual units of law (e.g., individual court decisions or chapters of a regulation) in the legal system, we create profiles of these units covering all temporal snapshots in the document collection under study. More specifically, based on the quotient graphs that are created on the level of our unit of interest and contain only reference edges (like the preprocessed graphs described in Step 1, Section 3.2.2), we track ten statistics in five groups (note that not all of these statistics can change over time for units of all legal document types): 1. the number of tokens and the number of unique tokens, 2. the number of items above, on, and below the sequence level (provided our unit of analysis lies above the sequence level), 3. the number of self-loops, 4. the weighted in-and out-degree (accounting for parallel edges), and 5. the binary in-and out-degree (excluding parallel edges).
These statistics capture how the unit of law in focus evolves in size (number of tokens), topical breadth (number of unique tokens), structure (number of items above, on, and below the sequence level), selfreferentiality (number of self-loops), scope of interdependence within the legal system (weighted in-degree and weighted out-degree), and diversity of interdependence within the legal system (binary in-degree and binary out-degree). Finally, by constructing the ego graphs of the profiled unit for its out-neighborhood and its in-neighborhood and following the evolution of these ego graphs across snapshots, we assess to which extent a profiled unit references which other units (reliance) and to which extend it is referenced by which other units (responsibility).

RESULTS
In the following, we apply the framework presented in Section 3 to the data introduced in Section 2.2, i.e., codified law comprising federal statutes and regulations in the United States and Germany over the 22 years from 1998 to 2019 (inclusive). We start by examining the growth of the United States and German national legal systems (henceforth: the national legal systems) as viewed through the lens of our data (Section 4.1). Next, we investigate the macro-level, meso-level, and micro-level connectivity of these national legal  systems (Section 4.2). Finally, we explore the evolution of selected chapters of the USC and the CFR and selected German statutes and regulations within their national legal systems in a case study focusing on financial regulation (Section 4.3). The results we report are mostly descriptive, and as discussed in Section 5, identifying causal factors behind the dynamics we observe or interpreting our results using a qualitative approach is left to future research. Figure 5 summarizes the growth of the United States legal system and the German legal system as measured by the tokens, structural elements, and lateral references contained in their codified law. Each row of the figure corresponds to a country, and each column corresponds to a document type. All counts are divided by their value in 1998, i.e., Figure 5 depicts growth relative to the 1998 baseline. Supplementing the time series data, Table 2 provides the absolute counts for 1998 and 2019 and the total percentage change between these years (∆). Figure 5 and Table 2 show that over the last two decades, the legal systems of both countries have grown substantially. In the United States, the USC (containing codified statutes) has over 60 new structural elements (e.g., chapters, parts, or sections) in 2019 for every 100 such elements it had in 1998. Notably,  Table (2). (Rounded) size of the national legal systems of the United States (top) and Germany (bottom) as measured by the tokens, structural elements, and references in their codified law in 1998 and 2019, including the total percentage change between these years (∆).

Growth
as evident from the upper left panel of Figure 5, the growth rate of the USC appears to have experienced two distinct periods when measured by its structural elements: one period with a monotonic growth rate of approximately 4 % per year (1998-2010), followed by another period with a decelerated monotonic growth rate of approximately 2 % per year (2010-2019). At a slightly lower level, this trend also occurs for both the number of tokens and the number of intra-USC references. For example, there are approximately 40 new tokens or references in 2019 for every 100 tokens or references that existed in 1998. Shifting the focus for the United States to the CFR (containing codified regulations), as observable from the upper right panel of Figure 5, the quantity of regulations has increased by an even greater factor. For every 100 structural elements or tokens that were present in 1998, approximately 90 additional elements or tokens exist in 2019. This increase is even more extreme for intra-CFR references, where there are almost 160 new references in 2019 for every 100 that existed in 1998. Apart from brief intervals of stagnation or slight decrease (2009)(2010)(2013)(2014), these increases have been monotonic.
Corresponding trends for German statutes and regulations are presented in the bottom row of Figure 5. Growth in the German legal system has been qualitatively similar to that in the United States legal system but quantitatively less pronounced and of different functional shape.    Table 2). At a high level, the growth of the German legal system thus seems to be driven by statutes, whereas the growth of the United States legal system appears to be driven by regulations. Figure 5 and Table 2 only account for lateral references, excluding references between documents of different types. Therefore, Figure 6 shows growth relative to the 1998 baseline for lateral and upward (i.e., regulation-to-statute) references. We exclude downward references because they are very few in number (which means that even a small absolute increase results in a large relative increase) but note that, contrary to the legal theory intuition, they do occur. 5 As evident from Figure 6, upward references have grown at similar rates in both countries, with approximately 80 new upward references existing in 2019 for every 100 upward references that existed in 1998. This relative increase is larger than that of the lateral references in both countries, with the exception of lateral regulation references in the United States, whose growth rate dwarfs all others. Since the token and structural element growth rates of German regulations are lower than or similar to those of German statutes, this means that over the period under study, connectivity between statutes and regulations in Germany has grown faster than connectivity within statutes or within regulations.
To evaluate how the growth in the number of references affects the differences in the prominence of individual sections of codified law in the legal systems under study, in Figure 7, we examine the in-degree distribution and the out-degree distribution of the graphs induced by the reference edges in 1998 and 2019  the SI). Since these distributions are highly skewed (as in many graphs arising from complex systems), we plot them on a log-log scale.
All distributions plotted in Figure 7 demonstrate features common among graphs arising from bibliometric dynamics. For example, most sections of statutes and regulations in the United States and Germany are referenced very few times (if at all). The detailed characteristics of the distributions, however, differ between distribution types, document types, and countries: For the United States, the out-degree distributions exhibit less right skew than their in-degree counterparts, while in Germany, we observe the opposite: All out-degree distributions are either within an order of magnitude of or have a longer and thicker right tail than their in-degree counterparts. Similarly, the sections contained in United States regulations exhibit a higher degree of skew in their in-degree distributions than the sections contained in United States statutes (e.g., a higher fraction of these sections has more than 500 ingoing references), but in Germany, the opposite phenomenon occurs at a lower absolute level: There are many statute sections with more than 100 ingoing references but hardly any regulation sections clearing that threshold. These national divergences might be partly due to the differing ratio between statutes and regulations, but they could also point to peculiarities in United States and German drafting style.
Comparing all distributions across countries, we observe that the United States legal system exhibits more extreme statistics than the German legal system (which might, at least in part, be due to its larger size). Finally, we see that from 1998 to 2019, most distributions shift to the right, i.e., the tails become both longer and thicker, which is in line with bibliometric preferential attachment dynamics [59,60]. This indicates that reference growth has disparate impact, amplifying the differences in relevance between the individual sections contained in United States and German statutes and regulations. As a consequence, the difficulty of navigating the law increases more slowly than the growth of the reference count may suggest.

Connectivity
When exploring the connectivity of the national legal systems of the United States and Germany over time, we distinguish between the macro level, the meso level, and the micro level as suggested in Section 3.2.

Macro-level connectivity
To understand how the United States legal system and its German counterpart organize and process information, we investigate the connectivity of the graphs containing code sections as nodes and references between them as edges. Figure 8 displays the number of non-trivial (weakly) connected components (i.e., components with more than one node) in these graphs over time, in absolute terms and per 1000 tokens. It shows that the connectivity in the graphs containing only statute sections is generally higher than that in the graphs containing only regulation sections or sections of both document types. Furthermore, while the United States system seems more fragmented than the German system ( Figure 8 (a)) when considering absolute numbers, it turns out to be relatively less fragmented when normalizing for system size (Figure 8 (b)).
For a more granular connectivity assessment over time, Figure 9 shows, for each year from 1998 to 2019, what fraction of statute sections and regulation sections in each country is contained in the largest connected component, satellite components, or isolates, and how the largest connected component is composed internally. The underlying graphs do not distinguish between sections of different document types; analogous figures considering statute sections only and regulation sections only can be found in Section 4.2 of the SI. In both the United States and Germany, the largest connected component is growing as the fraction of sections contained in both satellites and singletons decreases, and the difference between the largest connected component fraction in 1998 and that in 2019 is around 10 %. However, the relative size of these largest connected components varies substantially between the two countries: In the United States, the largest connected component has grown from about 40 % to nearly 50 %, while in Germany, its size has increased from circa 55 % to roughly 65 %. Furthermore, the fraction of isolates (sections that neither reference another section nor get referenced by another section) is larger in the United States (around 45 % in 2019) than in Germany (below 30 % in 2019).
When focusing on the largest connected component and taking edge directions into account, the differences between the two countries become even more pronounced. In the United States, the fraction of the largest connected component contained in the in-only component is almost equal to that contained in its tendrils and tubes in 1998, and both lie around 45 %. Over time, these fractions diverge as the strongly connected component and the out-only component grow and the in-only component stagnates. In Germany, however, tendrils and tubes dominate in 1998, accounting for more than 65 % of nodes, but by 2019, their fraction has declined to less than 45 %, while the strongly connected component and the out-only component have grown at low levels and the in-only component has gained more than 50 % in fractional size (growing from less than 20 % to over 30 %).
Notably, in both legal systems, the out-only component accounts for the smallest fraction of sections in 2019 (around 7 % in the United States and around 12 % in Germany), followed by the strongly connected component, with none of them containing more than 15 % of all sections, while the in-component is twice as large in Germany and thrice as large in the United States. Hence, at least when considering code sections as nodes and references between them as edges, both national legal systems do not exhibit the bowtie structure observed in biological systems (small strongly connected component with larger in-only and out-only components [53]) or that found in early measurements of the World Wide Web (all components, including tendrils and tubes, of roughly the same size, with a slightly larger strongly connected component [52]). Rather, the legal systems we study are shaped more like rockets, with the in-only component as their base, tendrils and tubes as their fins, the strongly connected component as their body, and the out-component as their nose cone (see Figure 10 for an illustration). The rocket structure mirrors both the hierarchical structure of legal systems (large in-only component, small out-only component) and the fact that some areas of law function relatively independently (many tendrils and tubes; also evident from the nontrivial fraction of nodes outside the largest connected component). This suggests that it might be characteristic of legal systems in general, but more research is needed to corroborate this hypothesis. Similarly, it would be interesting to investigate how our observations change if we include, e.g., non-atomic references (which, by definition, interconnect multiple sections).

Meso-level connectivity
When analyzing the connectivity of the United States and German legal systems at the meso level, our goal is to create a dynamic, data-driven map of their codified law. To this end, for both the United States and Germany, we compute cluster families as described in Section 3. Germany. Here, we choose 100 as the preferred number of Infomap clusters and 15 % of tokens as the edge threshold for constructing the cluster family graph (for details on how we handle text that does not lie in a chapter as well as a sensitivity analysis of the parameter choice, see Sections 4.3.1 and 4.3.4 of the SI). We calculate how many tokens from statutes and regulations these families contain in each year from 1998 to 2019. By construction, our cluster families unite sets of related rules that can be thought of as different areas of law, where-unlike in, e.g., the title structure of the USC or the German finding aids' subject classification (Fundstellennachweise, FNA)-the categorization is based solely on the empirically observed reference relationships between the legal documents in our data. Figure 11 shows the evolution (1998-2019) of the ten cluster families with the largest number of tokens in 2019 (henceforth: top ten cluster families) for each country, which we label leveraging our subject matter expertise (details on the labeling procedure and complementary linguistic statistics can be found in Section 4.3.2 of the SI). Most families either represent a traditional field of law (e.g., property law or financial regulation) or concern a real-life domain (e.g., energy or vocational training). A few families hold clusters from more diverse backgrounds and are therefore hard to interpret at first sight (e.g., a family containing military, public finance, and research regulation in the United States or a family containing court procedure, data security, and telecommunications in Germany). However, a more detailed examination of the individual clusters constituting these families uncovers nuanced underlying topics (e.g., grants and commercial activity by the federal government in the example from the United States, and data protection in public [including court] proceedings in the example from Germany). Hence, in summary, the method sketched in Section 3.2.2 produces an informative map of the codified law for both countries we investigate (at the resolution level determined by our parametrization).
Inspecting the panels in Figure 11 in more detail, we observe that the families' ratios of statute tokens to regulation tokens span the whole possible range: Some families are statute-heavy (i.e., contain mostly statute tokens), others are regulation-heavy (i.e., contain mostly regulation tokens), and yet others are mixed (i.e., lie between the aforementioned extremes). For a robust categorization of the ten largest families, the data suggests a threshold of an average 80 % (i.e., an average ratio of 4 : 1) over the entire investigation period to classify a family as x-heavy for x ∈ {statute, regulation}. In the United States, this leads to four mixed families (Agriculture and Food; Financial Regulation; Energy; Housing) and six regulation-heavy families. In Germany, we find four statute-heavy families (Courts and Data Protection; Criminal Law and Justice; Corporate Taxes; Property), one regulation-heavy family (Vocational Training) and five mixed families. The overall situation remains similar even if we adopt a simple majority for the classification As Figure 11 traces the development of the top ten cluster families in each country over time, we can also observe changes in the families' composition. Extending the terminology adopted above, we can classify the families' growth based on the fraction of growth that is attributable to each of our document types. We say that a family is x-driven for x ∈ {statute, regulation} if tokens from x account for at least 80 % of the family's net growth when comparing 1998 and 2019, otherwise, we say that its growth is mixed. Using these categories, we can classify all of the United States top ten families as regulation-driven and half of the German top ten families as statute-driven (Social Security; Personal and Consumption Taxes; Criminal Law and Justice; Corporate Taxes; Property), while only one German family is classified as regulation-driven (Vocational Training). The full categorization of all top ten families for both countries, both in terms of their average composition and in terms of their growth, can be found in Section 4.3.3 of the SI, where we further show that the general tendencies described above also hold for the entire population (although the trends are neither monotone nor universal and their extent differs from family to family).
Overall, the dynamics of the largest cluster families reflect the growth patterns documented in Figure 5. In absolute terms, regulations outgrow statutes by large margins in all of the top ten United States families, and statutes moderately outgrow regulations in most of the top ten German families. In relative terms, regulations still dominate in the United States, and statutes still dominate in Germany (although they are less prominent than they appear when considering absolute numbers). In summary, based on the top ten families depicted in Figure 11, the United States seems to favor rule making via regulations, while Germany seems to favor rule making via statutes, and both countries' preferences appear to get stronger over time.
Finally, to evaluate how federal regulations impact our data-driven map of the United States and German legal systems, we compare the cluster families depicted in Figure 11 to those derived in prior work that considers only federal statutes [27]. For the United States, the top ten cluster families based on statutes only have topics similar to those derived from statutes and regulations combined, including Environmental and Health Protection, Public Health and Social Welfare, Taxes, Agriculture and Food, Financial Regulation, Public Procurement, Telecommunications, and Federal Grants and Commercial Activity including Small Business Aid. The topic of Education makes the top ten in the statutes-only data but not in the data containing regulations, while Maritime Affairs and Transport as well as Energy only rise to prominence in the combined data. In Germany, topics such as Financial Regulation, Taxes, Social Security, Environmental Protection, Criminal Law and Justice, and Property represent sizeable cluster families based on both datasets. The topic of Public Servants, Judges, and Soldiers features prominently only in the results excluding regulations, while the families of Vocational Training and of Environmental and Workplace Safety make the top ten only in the combined data.
First and foremost, however, comparing our results to those from [27] demonstrates that adding federal regulations to the data results in a more accurate map of law. For example, the German data from [27] features a family on Market and Network Regulation that includes a leading cluster on (renewable) energy law, while no comparable family exists in the United States. Having added federal regulations, we now see such a family in the top ten also in the United States, whose prominent position is explained by its mixed composition (including more than 70 % regulation tokens on average). At the same time, a cluster concerning (renewable) energy law is now part of the Environmental and Workplace Safety family in Germany because its regulations connect it more closely to rules concerning the protection of the environment than its statutes alone. This suggests that adding yet further document types, e.g., federal court decisions, to our data will continue to improve the legal maps produced using our methodology, making this a promising avenue for further research.

Micro-level connectivity
We analyze the connectivity of the United States and German legal systems on the micro level in order to identify those code sections that play a particularly important role in mediating the information flow between the sections which they reference and the sections by which they are referenced. More precisely, we apply the method sketched in Section 3.2 to the graphs induced by the reference edges, where we keep a star if it has at least ten nodes in total. We classify these stars (and their hubs) into sinks, hinges, and sources depending on the ratio between their hubs' in-degree and their hubs' out-degree, and hypothesize that hubs of the same type have a similar function within the legal system. We explore the merits of this hypothesis by identifying and classifying the stars of each type in 1998 and 2019 and analyzing the content of the top five stars (i.e., those with the largest number of nodes) of each type in 2019 as shown in Table 3.
In the United States, we find that hubs of the same type indeed play similar roles in the legal system: Sinks contain delegation of authority and general procedures, e.g., for record keeping, that are relevant for and therefore referenced by many other sections. Hinges connect entire collections, enumerations, and definitions to one another. 49 CFR § 171.7 is an example, as its only function is the incorporation of material collections by external parties (such as the American National Standards Institute) into other sections of the CFR like 49 CFR § 173.306, which itself serves as a hub for other sections. Sources enumerate duties contained in other statutes (four of the top five stem from the CFR title on Agriculture, in which this drafting technique seems to be popular) or provide a document map for their respective chapter.
In Germany, the results paint a similar picture: Sinks contain provisions for delegation of legislative authority (as expected by legal theory), competencies, statements of goals, or definitions. Hinges contain transitional provisions, which are designed to bridge between old and new rules, as well as definitions. The definition classified as a hinge ( § 100a Strafprozeßordnung) establishes a well-known connection between the Criminal Code and its definition of crimes and investigative methods described both inside and outside the Code of Criminal Procedure. All sources (and one hinge) are collections of misdemeanors to sanction violations of rules contained in their respective statute or regulation, and they encompass activities as diverse as road traffic, securities trading, and handling radioactive materials. Hence, our classification correctly identifies examples of this popular drafting technique.
As suggested in Section 3.2.3 and confirmed for the largest stars, the type of a star contains information about a section's function within the legal system. Examining the hundred largest stars, whose types are shown in Table 4, exposes different trends in both countries. In the United States, sinks dominate both across document types and over time, accounting for three out of four stars in 1998 and six out of seven stars in 2019, which points to a pronounced drafting preference. At the local level, sections of the United States codified law are mostly connected (only) by referencing the same section, which often contains a definition or the description of a procedure. In Germany, the composition is more balanced to begin with, but sinks still make up the largest share in 1998. Over time, though, the number of sinks and sources amongst the hundred largest stars decreases in favor of hinges. Hence, individual sections are no longer only connected by a reference to the same section, but the frequently referenced sections themselves increasingly reference other sections. As a consequence, the number of sections that are reachable from any individual section in two hops (i.e., following two references) increases. This makes the information flow via references more efficient, which could explain the reduced need for structural elements to guide information flow via hierarchy in Germany when compared to the United States. But it also increases the prevalence of reference chains, possibly making the German legal system progressively harder to navigate.  with stars whose hubs are contained in regulations marked grey. Edge and degree counts exclude multiedges; m S is the number of edges between spokes, δ + is the hub's out-degree, and δ − is the hub's in-degree.
Mirroring the larger trends described in Section 4.2.1 and Section 4.2.2, regulations play a more important role in the United States than in Germany at the micro level of connectivity as well. While the total share of regulation hubs in Germany is small, they make up almost half of the sources amongst the top hundred reference stars in 2019, which again follows the larger pattern of regulations referencing rather than being referenced. In the United States, regulation hubs account for just under 40 % of the top hundred reference stars, but almost all of the largest stars are sinks, regardless of the document type of their hub. This suggests that the United States drafting dynamics resulting in sinks affect both the executive and the legislative branches of government.

Profiles
In a step toward developing a dashboard for measuring and monitoring the law, we demonstrate the utility of the profiling procedure described in Section 3.3 by applying it to selected statutes and regulations from the United States and Germany in a case study focusing on financial regulation. We profile a total of four statutes (two from each country) that constitute landmark legislation in this domain and trace their statistics over time in Figure 12, along with those of two additional regulations from the same area.
12 USC Ch. 16, popularly known as the Gramm-Leach-Bliley Act or Financial Services Modernization Act of 1999 (GLBA), liberalized the United States financial market by allowing the combination of investment banks, commercial banks, and insurance companies in one institution. It has been in effect for nearly our entire investigation period (1999-2019) and, as indicated by nearly flat lines in all but the panels related to in-degree, has not materially changed. However, the interaction of the GLBA with other parts of the legal system has been anything but static, with its initial weighted in-degree of 1000 increasing by 60 % between 1999 and 2019 due to incoming references from other statutes and regulations. Unlike the growth trend in the weighted in-degree, the growth trend in the binary in-degree is nearly monotonic. This indicates that most of the fluctuations in the GLBA's regulatory environment occur within individual chapters of the USC or the CFR. In summary, the GLBA can therefore be rightfully regarded as a landmark statute, which has required little engineering but has remained an important reference throughout the period under study.
The profile of 12 USC Ch. 53, popularly known as the Dodd-Frank Act or the Wall Street Reform and Consumer Protection Act (DFA), shows similarities with the GLBA in most statistics we track. Introduced in response to the Great Recession in 2010, it is approximately half as old as the GLBA, and like the GLBA, it has barely changed in size, breadth, or structure. But although the DFA is comparable to the GLBA in size, its interaction with the environment seems much more dynamic, with its weighted in-degree increasing by a factor of almost ten over its lifetime. In absolute terms, however, the references increase by less than 500, i.e., in the same order of magnitude as for the GLBA. This is in line with the fact that both statutes are part of the same legal domain, and it highlights how much the evolution of individual pieces of legislation is influenced by their initial conditions, e.g., whether they are strongly connected with their environment already at birth. For the DFA, the growth of the weighted in-degree again is not monotonic,

Measuring Law Over Time
but it is visibly steeper before 2017 than afterwards, leveling off in the last years of the period under study. The binary in-degree, whose gradient is almost monotonically decreasing from the start, anticipates this deceleration by several years. This suggests the existence of an onboarding period, in which the DFA is integrated into the regulatory environment before finding its place in the United States legal system (see the related discussion in [61]).
The profiles of the two German statutes we examine are starkly different from those of the United States statutes. Statutes under the names of both the Stock Exchange Act (SEA) and the Securities Trading Act (STA) have been in effect for the entire observation period. As indicated by their unique token count, they are both constantly narrow in thematic scope (with the STA an order of magnitude more narrow than the SEA to start with), and their token count increases over time. While the SEA and the STA start at comparable sizes in 1998, the STA grows by a factor of seven, while the SEA merely doubles. Possibly as a result, the SEA largely maintains its original number of structures, while the number of structural elements in the STA triples. This is accompanied by an expected, nearly parallel increase in the number of STA sections, and even a decrease of about 25 % in the number of SEA sections. Beyond the general growth trends present in almost all STA statistics, the period from 2006 to 2007 stands out, as most of its statistics experience a relatively steep increase between these years. The doctrinal investigation prompted by this observation reveals that the source of the increases is a legislative project translating extensive transparency requirements mandated by the European Union into German law (Transparenzrichtlinie-Umsetzungsgesetz), which came into effect in January 2007. This finding also shows how our methods can complement doctrinal legal scholarship, as has been demonstrated, e.g., for the development of the STA over its entire lifetime [28].
Our statistics produce interesting insights not only for statutes but also for regulations. For example, there is a noticeable increase in the self-referentiality of the CFR chapter about the Commodity Futures Trading Commission (CFTCR), and the German Reports and Documents Regulation (RDR) shows structural changes between 2005 and 2006 as well as between 2015 and 2016. As our framework enables the joint modeling of data from different document types, its application can surface characteristic differences between these types, too. Examining our exemplary regulations and statutes in Figure 12, we find that the CFTCR experiences noticeable growth (about 200 %), while the size of the featured statutes barely changes. At the same time, the regulation's weighted in-degree is several orders of magnitude smaller than that of the DFA or the GLBA, supporting the intuition that statutes should be referenced more frequently than regulations for this particular case. In Germany, the RDR is smaller than the featured German statutes, and it covers less diverse content (as would be expected for a regulation from a legal theory perspective). Its structural organization is minimal, as is its self-referentiality. This confirms that smaller units of law require less internal organization by both structure and references. The RDR references, and is referenced by, a small number of different documents, indicating homogeneity in its regulatory environment. Its weighted out-degree falls between the SEA and STA, i.e., it has a non-negligible number of references to a limited number of targets. In summary, the RDR has most characteristics expected from a German regulation, and its overall profile can clearly be distinguished from that of the featured German statutes.
Our framework enables comparisons not only across document types but also across countries. When examining the DFA and the STA, we see that the STA starts at a size of roughly a third of the DFA but grows to two thirds of the DFA over time. Both statutes have similar degrees of structure at the section level and above, but the DFA contains ten to fifteen times the amount of items below section level, indicating a vastly more granular hierarchical organization. Conversely, the STA contains three to four times more self-loops than the DFA, with its weighted in-degree about 1.5 times and its binary in-degree between 1.5 and 2 times higher than those of the DFA after the first couple of years. This mirrors the more general finding that rule-making agents in the United States and Germany favor different mechanisms to handle the token growth of their statutory corpora: Americans like adding hierarchical structure, while Germans prefer adding references [27]. Figure 13 combines profile statistics concerning size and interdependence to enable direct visual comparisons. Here, we compare the ego graphs of the DFA and the STA for every quarter of their existence during our investigation period. Note that the distance between the snapshots is different for both statutes, as the DFA was adopted only in the middle of our study period, but both series end in 2019. Complementing the statistics presented in Figure 12, the visualization attributes the references to their actual sources and targets, indicating their number by the weight of the edges. For the DFA, its reliance (i.e., how much and how diversely it references other statutes and regulations) barely changes, while its responsibility (i.e., how much and how diversely it is referenced by other statutes and regulations) discernibly increases, as the DFA becomes more and more integrated with its environment. In contrast, both the reliance and the responsibility of the STA increase over time, with its responsibility starting nearly twice as high and increasing at a much faster rate than its reliance. As shown by the edge colors, the diverse responsibility of the STA concerns both statutes and regulations, and the DFA is most intensively responsible for regulations. In line with the expectation derived from legal theory, both the DFA and the STA rely mostly on statutes.

DISCUSSION
We have introduced an analytical framework for the dynamic network analysis of legal documents and demonstrated its utility by applying it to a dataset comprising federal statutes and regulations in the United States and Germany over a period of more than 20 years. The limitations of this work concern two separate areas: the methods introduced in Section 3 and the results presented in Section 4.
To gravitate toward its ideal formulation, our framework requires further refinement based on experiences from applications to diverse datasets. Our model is deliberately document type and country agnostic, such that it can be easily instantiated for new data. Similar studies using legal documents from a variety of jurisdictions would be of immense value for improving our framework, and they could provide further context for the results reported in Section 4. Furthermore, our network analytical framework could be complemented by a framework for natural legal language processing, as the combination of relational information and linguistic information will likely lead to insights that would not be possible using either of these sources alone.
When preparing this article, we found that combining documents of different types in one graph representation raises many conceptual questions. Some of these questions relate to the presentation of our results, e.g., whether to depict dynamics in absolute or relative terms (thereby either impairing comparisons across document types of different sizes or visually overstating dynamics for small baselines). Others concern design decisions when defining our methods, e.g., whether tokens from documents of different types should have the same weight when determining cluster families even if there is a striking imbalance between the total number of tokens in documents of these types (as is the case in our United States data). Here, one alternative would be to rescale the token counts before constructing the cluster family graph, such that the total influence of tokens from one specific document type is equal across all types. While this would change the results to a certain extent, it is difficult to assess whether the modified method would be superior because comparable investigations of multimodal legal document networks currently do not exist.

Measuring Law Over Time
Dodd-Frank Act (United States)   The results stated in Section 4 are limited in geographic scope (United States and Germany), temporal scope (1998-2019), and institutional scope (legislative and executive branch on the federal level). Most importantly, our findings cover only codified law. As the United States and Germany are typically assumed to follow distinct legal traditions (common law and civil law), which are often thought to differ, inter alia, in their reliance on court precedent, including court decisions might have disparate impact on our results for both countries. However, it could also provide empirical evidence against the traditional classification. Irrespective of legal traditions, unlocking and integrating judicial data is an important direction for future work.
Regarding both growth and connectivity, the next steps consist in eliminating the uncertainties and limitations affecting our data. For example, as highlighted in Section 2.2, one important stride toward a more comprehensive picture of the connectivity between legal documents is the extraction and resolution of non-atomic references. At the macro level, connectivity could also be evaluated at other resolutions (e.g., the chapter level) or when including hierarchy edges, and our analysis could be expanded using further statistics, such as motif counts and their evolution over time. Furthermore, applying our methods to other document types or other countries would help us assess whether the rocket structure we found in our data is characteristic of legal systems in general. When assessing connectivity at the meso level, the dynamic map of law provided by our cluster families could be further refined, especially at other resolution levels. At the micro level of connectivity, a more fine-grained star taxonomy might be in order because in both countries, there exists some functional overlap between hinge stars and sink stars. For the profiles, a sensible step forward would be to apply the tracing methodology at other levels of resolution (e.g., at the level of individual sections), and the statistics we track could be complemented by similarity measures allowing us to compare between the different units of law we analyze.
Beyond the specific opportunities for further research outlined above, our work raises three larger questions to be explored in the future: 1. When quantitatively analyzing legal documents, how should we choose the unit of analysis?
On the one hand, no clear consensus exists as to what constitutes a unit of law or a legal rule. But on the other hand, the choice has far-reaching consequences for all analyses. Furthermore, even analyzing all documents at the same structural level presents problems: Legal rules come in various sizes, and at times, a single paragraph might be longer than the average document due to drafting decisions by the agents in the legal system. This complicates comparisons and creates countless opportunities for erroneous interpretations. Detailing the full rationale behind all choices we made when presenting our results in Section 4 is beyond the scope of this article. However, an extensive exposition of the possible choices and the tradeoffs surrounding them would benefit the research community at large and, therefore, constitutes a fecund field for future findings.
2. How can we measure the regulatory energy of statutes?
The analysis of individual statutes such as the Gramm-Leach-Bliley Act and the Dodd-Frank Act suggests that legislative outputs impact their environments at potentially different rates (e.g., by prompting further rule making), i.e., that they have a certain regulatory energy that they emit over time. This hypothesis could be validated, inter alia, using external data on regulatory relevance, e.g., the filings concerning regulatory risk that are required for annual and transition reports pursuant to sections 13 or 15(d) of the Securities Exchange Act of 1934 under 17 CFR 249.310 -Form 10-K [62]. However, other approaches are equally possible and merit further investigation.
3. How can we connect our empirical findings to established theories in law and political science? Although beyond the scope of this work, some of our findings can be combined with analyses using Coupette et al.

Measuring Law Over Time
established theories on the composition and evolution of codified law in both legal scholarship and political science. The most prominent example here is the question of delegation: How does it happen and what are its limits, in theory and in practice? This touches the heart of democratic legitimacy, and it presents a promising opportunity for empirical legal studies to contribute to mainstream legal and political science discourse that we are planning to seize in the future.

CONFLICT OF INTEREST STATEMENT
DMK and MB are affiliated with the start-up LexPredict, which is now part of Elevate Services. CC, JB, and DH declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

AUTHOR CONTRIBUTIONS
All authors conceived of the research project. CC, JB, and MB performed the computational analysis in consultation with DMK and DH. CC, DH, and MB drafted the manuscript, which was revised and reviewed by all authors. All authors gave final approval for publication and agree to be held accountable for the work performed therein.

SUPPLEMENTAL DATA
The supplemental material for this paper is archived under the following DOI: TBD

DATA AVAILABILITY STATEMENT
For the United States, the raw input data used in this study is publicly available from the Annual Historical Archives published by the Office of the Law Revision Counsel of the U.S. House of Representatives and the United States Government Publishing Office, and is also available from the authors upon reasonable request. For Germany, the raw input data used in this study was obtained from juris GmbH but restrictions apply to the availability of this data, which was used under license for the current study, and so is not publicly available. For details, see Section 1 of the SI. The preprocessed data used in this study (for both the United States and Germany) is archived under the following DOI: https://doi.org/10.5281/zenodo.4660133

Supplementary Information
1 DATA SOURCES

United States Statutes
For statutes in the United States, we use the United States Code (USC) as our data source. The USC is a compilation of the general and permanent laws of the United States on the federal level, excluding state legislation. The Office of the Law Revision Counsel of the U.S. House of Representatives (henceforth: the Office) updates the Code continuously and publishes annual versions (although the codification process can lag behind the state of the law by several years). When Congress passes new legislation, this legislation is initially published as a Slip Law in the United States Statutes at Large. If the new legislation is considered general and permanent law, the Office integrates the law into the USC. Depending on the Titles of the Code that are modified, the work of the Office is approved by Congress, whereby the Slip Law is repealed and replaced by the USC as the new primary source of the law. Even if the work of the Office is not approved by Congress, the USC is still presumed to be the correct consolidation of the law.
We base our work on the Annual Historical Archives published by the Office, which are available on its website. 1 The USC is provided in a documented (X)HTML. 2 This format is flexible and offers a wide variety of styles to closely represent the printed code. The Code is split into single files per year and Title. The Annual Historical Archives date back until 1994, and they are published with delay. As of January 2021, therefore, 2019 is the latest available edition.
While surveying and validating the raw data, we observe and correct the following obvious errors: This data source is nearly identical to the source used in [1], but the inspected time frame is updated.

United States Regulations
For regulations in the United States, we use the Code of Federal Regulations (CFR) as our data source. The CFR is a codification of the general and permanent rules published in the Federal Register by the departments and agencies of the Federal Government, excluding regulations below the federal level and other (e.g., less permanent) regulations. Like the USC, the CFR is updated continuously, and the codification process can lag behind the state of the law by several years.
Our work is based on the annual bulk data provided by the U.S. Government Publishing Office (GPO) in partnership with the National Archives' Office of the Federal Register (OFR), which is available from their website. 3 The data is provided in a documented XML format, 4 whose structure is influenced by the printed version of the CFR. It contains one file per year and Volume of the (printed) CFR. The data dates back Supplementary Information until 1996, and it is published with delay. Since the first two published years of the data are incomplete, we start our analysis in 1998 (for all data sources).
Unfortunately, in the bulk downloads for some years, especially for the year 2002, some CFR Volumes are missing although they reappear in later years, i.e., there are gaps in the data. We fill these gaps using the data of the closest previous year in which the Volume is available. This corresponds to the forward fill strategy to complete missing data, with the modification that we only fill gaps, i.e., we require that a Volume exists in an earlier snapshot and in a later snapshot (e.g., since Title 50 Volume 14 only exists in 2013, we do not fill any gaps regarding this volume). In other words, we inspect collections of the most recent versions of CFR Volumes at a given point in time. In Figures S1-S3, we show the Volumes included in the bulk download before filling the gaps as described above. The figures also illustrate the incompleteness of the data in 1996, 1997, and 2020, and the increase in the number of Volumes for Title 40 and Title 50 is striking. When interpreting the figures, it is important to note that all Volumes are visualized as rectangles with the same, fixed area, although their text lengths vary widely.

German Statutes and Regulations
In Germany, all federal statutes and regulations are published in the Federal Law Gazette as amending laws, which often combine introductions of new statutes or regulations with amendments to and repeals of existing laws. Individual statutes and regulations are officially classified into one of nine substantive categories with currently 73 sub-categories that contain over 400 subject areas in the "Fundstellennachweis A" (Finding Aids A). The Finding Aids A are published annually by the Federal Law Gazette upon instruction by the Ministry of Justice. However, unlike the USC, there is no official data source that provides all compiled general and permanent laws at the federal level along with their historical versions. Here, we profit from a generous cooperation with the leading German legal data provider, juris GmbH, to obtain a dataset similar to the annual versions of the USC and CFR. Although juris is a private company, the Federal Republic of Germany is its majority shareholder, and all branches of government rely heavily on juris to process legislative data. According to juris, the database contains every German federal statute and regulation since spring 1990. The data is not as structured as the USC data or the CFR data. Instead of maintaining annual consolidated versions, juris stores a new version of a statute and regulation for all changes that take effect on the same day. The data we use comes in separate files for each law and version. Thus, for German statutes, our data source is identical to that used in [1], but the inspected time frame is updated.
We may not share the text content of the German data along with this paper. However, a website maintained by the German Federal Ministry of Justice and Consumer Protection in collaboration with juris provides almost the entire federal legislation as XML files in the most recent version (i.e., without historical versions). 5 A daily archive of the XML files provided on this website (starting in June 2019) is maintained by the QuantLaw research group. 6 This dataset allows a partial reproduction of the research with a similar dataset. We requested the full dataset from juris GmbH, which required a dedicated contractual framework and non-disclosure agreement to be signed.  Title / Volume Figure S1. Volumes of the CFR that are included in the data source. The y-axis is ordered by title and volume. (1 of 3) 40  Title / Volume Figure S2. Volumes of the CFR that are included in the data source. The y-axis is ordered by title and volume. (2 of 3) 49 40 34  40 34  40 33  40 33  40 32  40 32  40 31  40 31  40 30  40 30  40 29  40 29  40 28  40 28  40 27  40 27  40 26  40 26  40 25  40 25  40 24  40 24  40 23  40 23  40 22  40 22  40 21  40 21  40 20  40 20  40 19  40 19  40 18  40 18  40 17  40 17  40 16  40 16 Title / Volume Figure S3. Volumes of the CFR that are included in the data source. The y-axis is ordered by title and volume. (3 of 3)

SAMPLES OF LEGAL TEXTS
The following fragments illustrate the inherent structure of legal texts. Hierarchical inclusion relationships are indicated by indentation, labels of items on the documents' sequence level (seqitems) are typeset in SMALL CAPITALS, references are underlined, and text content is set in Italics.

United States Statutes
United

CERTAIN FINANCIAL COMPANIES
A nonbank financial company supervised by the Board of Governors shall be treated as a bank holding company for purposes of the Depository Institutions [1] Management Interlocks Act (12 U.S.C. 3201 et seq.), except that the Board of Governors shall not exercise the authority provided in section 7 [2] of that Act (12 U.S.C. 3207) to permit service by a management official of a nonbank financial company supervised by the Board of Governors as a management official of any bank holding company with total consolidated assets equal to or greater than $250, 000, 000, 000, or other nonaffiliated nonbank financial company supervised by the Board of Governors (other than to provide a temporary exemption for interlocks resulting from a merger, acquisition, or consolidation). to the state banking authorities, information and documents deemed confidential regarding registered clearing agencies and registered transfer agents; Provided That, in matters in which the Commission has entered a formal order of investigation, such disclosure shall be made only with the concurrence of the Director of the Division of Enforcement or his or her delegate, and the General Counsel or his or her delegate. . . . (1) Except as otherwise provided for in this Regulation, one copy of the reports and documentation which are to be filed or submitted under the Banking Act and which are specified in this Regulation shall be submitted both to BaFin and to the Regional Office of the Deutsche Bundesbank responsible for the institution. Reports and documentation from financial holding companies or mixed financial holding companies pursuant to section 12a (1) sentence 3, (3) and section 24 (3a) of the Banking Act shall be submitted to the Regional Office in whose area the superordinated enterprise pursuant to section 10a (3) sentence 4 of the Banking Act in the wording applicable as of 1 January 2007 or the conglomerate enterprise from the banking and investment services sector with the highest balance sheet total is domiciled. . . .

Regulation Concerning Reports and the Submission of
We convert the source data into a structured format that facilitates access for our purposes, removes unnecessary details (especially most of the style information for the text), and unifies the data format across all our data sources. The preprocessing is based on the methods used in [1]. We generalize the methods to include regulations and refine them, e.g., reducing their sensitivity to inconsistencies in the source data.
For the purposes of our analysis, we focus on three properties that characterize the structure of legal texts (illustrated in Section 2 above): 1. They are hierarchically structured (hierarchy), e.g., into Titles, Sections, Subsections, Paragraphs, and Subparagraphs.
2. Their text is placed in containers that are sequentially ordered and can be sequentially labeled (sequence), e.g., in statutes or regulations, these containers are typically Sections.
3. Their text may contain explicit citations or cross-references (henceforth: references) to the text in other legal documents or in other parts of the same document (reference), e.g., one section can reference (the label of) another section in its text.
To make these properties easily accessible in our data, we perform the following preprocessing steps on each of our data sources:

Clean the text
First, we remove all formatting, annotations, notes, and metadata from the text, with the exception of formatting and metadata that we need to extract the hierarchy in the next step. Where present, we include a document's preamble but exclude its appendices. For the USC, this results in a more conservative definition of legal text than in [2], which explains the difference between the reported token counts. As the German data is not consistently formatted on a level more detailed than text paragraphs (meaning one level below the so-called paragraphs or articles), we do not preserve formatting below the paragraph level for this dataset.

Extract the hierarchy
Using the remaining text, formatting, and metadata, we extract the hierarchy, i.e., we identify boundaries of elements (Chapters, Parts, Sections, etc.) that structure the code, determine their parents (Titles, Chapters, Parts, etc.) and, if present, their headings (including their alphanumeric ordering identifiers), and retrieve their children or textual content. With this information, we generate XML representations of the legal documents in which texts and structural elements are nested inside their respective parents.
Our data contains explicit information regarding the boundaries and nesting of structural elements above the section level in its metadata. We rely on this metadata down to the section level in both Germany and the United States. Below the section level, in the USC and the CFR, we exploit the formatting to derive a more detailed nesting of the text (for the CFR, we also infer the nesting using typical enumeration strategies).
For the CFR, we additionally merge Volumes that contain different parts of the same Title to ensure that the nesting of the data follows its hierarchy (i.e., how a Title is split into multiple Volumes has no influence on the nesting). We identify a structural element that is continued from a prior Volume by comparing the levels and headings of the last elements and the first elements of adjacent Volumes. This strategy captures most continuations correctly, but in some instances (especially in earlier years), it is over-inclusive or under-inclusive.
1. Find: We identify parts of the text that contain a potential reference to another text in the same country.
To find the referencing parts, we define-country specific regular expressions (regex) patterns. Most references in the USC follow a rather simple pattern, as references are mostly formatted consistently and include no headings or names but only numbers (and potentially letters of alphanumeric enumerations). References within the CFR and from the CFR to the USC are less consistently formatted. Therefore, we had to select a set of patterns for our analysis, and we expect that our extraction method results in a better reference coverage for the USC than for the CFR. We do not currently recognize, e.g., references by the popular name of the referenced act. Due to the variety of citation patterns, some citations are misinterpreted. However, the graphs we base our analysis on only model references whose source and target are known. Hence, a large part of the misinterpreted references does not affect the model since they are excluded from the graph because the reference target is missing.
To find the explicit references in the USC and CFR we consider, we distinguish between two reference types. The first reference type starts with the number of the Title followed by "U.S.C.", "C.F.R.", optionally a unit (e.g. "Section"), and the number of a Section or Part. In some instances, a specific element is referenced in the Section or Part, which is indicated by digits or letters in brackets. The second reference type starts with "Section", " §", or "Part", followed by the number of the Section, and optionally digits or letters that reference a specific element of that Section. The reference may close by providing the Title or the collection (USC or CFR) of the reference target, too. Either the Title is explicitly mentioned by "of title ..." or it must be inferred by the location of the reference (e.g., "of this title", "of this chapter", "of this section", or no reference location is indicated). The target collection of the reference may be referenced by "of the Code of Federal Regulations" or by "of the Code of the United States".
The pattern to extract references in Germany is very similar for statutes and regulations. The start of a reference to documents of both types is easy to identify, as references normally begin with " §" or "Art.". The part of the reference that follows may contain numbers (and letters of alphanumeric enumerations) as well as units (e.g., Satz [engl. sentence], Nummer [engl. number]). In the case of a reference to a text in a different law, the reference is followed by the name of the law. A list of the law names is generated from the source data, but it includes only laws valid at the time the analyzed law takes effect. Furthermore, references to other national regulations, EU law, etc., are filtered out, so that only references within and between federal statutes and regulations remain. Detailed documentation regarding the reference format used in German laws can be found in the "Handbuch der Rechtsförmlichkeit" [engl. Handbook of Legal Formalism] of the Federal Ministry of Justice and Consumer Protection. 9 Since this guide is not strictly followed by the legislator, we supplement it with the actual data to develop our reference extraction method.

Parse:
We parse the referencing texts and derive citation keys (cite keys) that, for the USC, consist of a Title and a Section of the referenced text. In the German case, the keys are composed of the

Generate graphs
We use the XML files along with information regarding the annual version the file belongs to (in the United States) or the validity period of a specific version of a statute or regulation (in Germany) to generate our final graphs. We produce these graphs for each annual version of the USC and the CFR, and for snapshots of the German data taken at the last day of each year, from 1998 to 2019. For the German data, we can generally produce graphs for each day in the period under study; the chosen dates are designed to match the United States data (this is preferable to the strategy used in [1], where snapshots are created on the first day of each year). All our graphs are generated using NetworkX 10 and can be exported, e.g., as GraphML 11 files. We store larger graphs in two CSV files: one for their nodes and one for their edges. The first column in the node CSV represents the key of a node, which is also used in the first two columns of the edge CSV to indicate the source of an edge (first column) and its target (second column). Other columns contain additional attributes of the nodes or the edges represented by each row. To optimize storage, the CSV files are compressed, and we recommend loading them with pandas 12 .

SUPPLEMENTARY TABLES AND FIGURES
In the following, we provide tables and figures that complement the results presented in the main paper in the order prescribed by the structure of its Results section.

Growth
The in-degree and out-degree distributions shown in the main paper do not normalize for section length. Figure S4 provides a normalized perspective, displaying the in-degree and out-degree distributions after dividing by the sections' lengths in tokens. The x-axis and the y-axis are shared across all panels except for the top left panel, which shows the normalized in-degree distributions for the United States. These in-degree distributions are similar to the German in-degree distributions up to an in-degree of two references per token, but they have a very long right tail due to a tiny number of sections with a very high number of tokens per reference. Upon closer inspection, these sections turn out to be empty, i.e., they do not have any text at all but are still referenced by other sections in the USC or the CFR. This is likely an artifact of the incremental codification processes in the United States, in which some Titles can be updated before others that depend on them.

Macro-level connectivity
The connectivity figures shown in the main paper depict connectivity in the graphs consisting of statutes and regulations together. Figure S5 and Figure S6 show connectivity for the graphs consisting of statutes only and regulations only, respectively. The figures show that the rocket structure is nearly ubiquitous (the exception being German regulations), although the precise rocket shapes differ between the graphs.

Constructing the cluster family graph
As input data for the clustering, we use quotient graphs on the chapter level in the United States and on the statute or regulation level (or the book level, if available) in Germany. Especially in the CFR, there are leaf nodes containing text that do not have a chapter as an ancestor. We merge these nodes into the highest ancestor that does not contain a chapter.

Second pass:
If v is an unmatched node in S i t and we find exactly one unmatched node w in S i t+1 with identical key and identical text, set φ i t (v) = w. If no key is assigned to the node, the key of the closest ancestor will be used instead. To compute an alignment between individual clusters, we use the node alignment described above, leveraging that every node in this alignment belongs to a cluster. Therefore, we can approximate the similarity between a cluster A at time t and a cluster B at time t + 1 by summing up the tokens of the most granular elements that are contained in A at time t and aligned with B at time t + 1.

Cluster family labeling
We derive the labels for the ten largest cluster families for each country from a manual inspection of their content, leveraging our subject matter expertise and familiarity with the United States and German legal systems. For each country, we generate a family composition summary. This summary lists all clusters contained in a family, details what percentage of the cluster is made up of which particular chapter, book, statute or regulation (measured in tokens), and details the path from the root to each element contained in Table S1. Excerpt from the summary of the top cluster family, Environmental and Health Protection, as used in the manual labeling process (adapted from the HTML original). the family's clusters, including the headings of all structural elements in which it is contained. We show the path down to the level of granularity in which we are interested, i.e., the chapter level of the USC and CFR for the United States and the book (if available), statute, or regulation level for the German data, relying on the headings to provide a description of the content. Table S1 shows an excerpt from the summary of the largest cluster family in the United States as used in our manual labeling process.
The family composition summaries provide enough dimensionality reduction to enable humans to assign a label, and they are part of the data provided with the paper. Supplementing this expert-based approach, we provide basic TF-IDF statistics (term frequency-inverse document frequency; for an introduction, see [4]) for the ten largest cluster families in both countries as CSV files in the data repository accompanying this paper. Table S2 and Table S3 contain the top ten nouns-according to TF-IDF (and excluding nouns describing hierarchical elements in legal texts, e.g., chapter or section)-for the United States cluster families depicted in the main paper.

Cluster family categorization
We show the exact numbers behind the classification of the top ten cluster families by their average composition or their growth, using either the 4 : 1 threshold or a simple majority rule, in Table S4 and  Table S5. As can be seen from Figure S7, the trends found in the inspection of the top ten families hold for the top hundred families as well. In the United States, the vast majority of cluster families contain less than 40 % statute tokens, with a mode below 1/8. Note that a substantial number of families contains statutes only, but while these small families make up the majority of families by number, they only account for a small fraction of the overall tokens. In Germany, most families are also small and contain more statute tokens than regulation tokens. Here, the larger the family, the higher the chance that it is dominated by statute tokens, with the majority of the largest clusters containing more than 50 % statutes and a mode above 7/8.

Clustering algorithm parametrisation
In the following, we analyze the performance of our clustering algorithm under different parameter choices to ensure that our results are not artifacts of our parametrization. The statistics we report are based on the Normalized Mutual Information (NMI) and Adjusted Rand Index (ARI)-two metrics that are commonly used for pairwise comparisons of clustering results. The NMI is an information-theoretic measure expressing how much information is shared between two clusterings. It is scaled to range between 0 (not similar at all) and 1 (identical), and defined as is the mutual information between X and Y , H(X; Y ) is the joint entropy of X and Y , H(X) and H(Y ) are the individual entropies, and H(X | Y ) and H(Y | X) are the conditional entropies. For more information on this measure, see [5].
The ARI is variant of the Rand Index (RI) adjusted for chance. The Rand Index is based on counting how many pairs of nodes are in the same clusters or in different clusters in both clusterings. It is defined as where a is the number of node pairs that appear in the same cluster in both clusterings, b is the number of node pairs that appear in different clusters in both clusterings, c is the number of node pairs that appear in the same cluster in X but in different clusters in Y , and d is the number of node pairs that appear in different clusters in X but in the same cluster in Y . The ARI is defined as where E[RI(X; Y )] is the expected RI when assuming that the X and Y partitions are constructed randomly, subject to having the original number of clusters and the original number of nodes in each cluster. While the RI ranges between 0 and 1, the ARI is bounded from above by 1 but may take negative values when the agreement between the clusterings is less than expected. Unrelated clusterings have an ARI close to 0 and identical clusterings have an ARI of 1. More information on this measure can be found in [6]. Figure S8 shows how the clustering results change when we alter the preferred number of clusters, with our chosen number of clusters as the baseline. As preferred numbers of clusters, we test all numbers divisible by 10 from 10 to 150 as well as the number 200. In one experiment, labeled auto, we let the Infomap algorithm choose the preferred number of clusters. Unsurprisingly, the box plots show that clusterings become more similar to our baseline clustering with 100 preferred clusters as we approach this number. At the same time, clusterings with 50 or 200 preferred clusters are already relatively similar to the baseline, with NMI values over 0.9 and ARI values over 0.7.

Sensitivity analysis
Note that the spread in clustering similarities is large for comparisons of the baseline with auto, i.e., the clusterings in which Infomap chooses the preferred number of clusters. This is likely due to the jumps in clustering granularity that sometimes occur in Infomap due to small differences in the minimum description length of competing models with different resolutions. These jumps also likely cause the spread   Upper whiskers extend to the last data point less than 1.5 times the box height above the fourth quartile, while lower whiskers extend to the first data point less than 1.5 times the box height below the first quartile.
for clusterings of the German data with a preferred number of clusters of around 20 to 30. Avoiding these jumps is our primary motivation for specifying a preferred number of clusters. Figure S9 shows the distribution of pairwise similarities between 100 consensus clustering results for different numbers of clusterings used in the consensus. The plots show that using a higher number of clusterings to form the consensus increases the overall similarity level and reduces the spread between the observed similarities. When choosing 1000 clusterings to form the consensus (as we do in the main paper), the consensus clusterings we obtain in different runs are almost identical.   Figure S9. Pairwise similarity between 100 consensus clustering results by number of clusterings used for finding the consensus (box plot interpretation as described in the caption of Figure S8).

Robustness checks
the majority lying between 0.60 and 0.90), while the ARI values for Germany mostly range between 0.75 and 0.95. All similarity distributions seem to shift toward the left over time, i.e., clusterings in earlier years tend to be more similar to each other than clusterings in later years. This is likely due to the growth in complexity reported in the main paper.

Cluster family evolution
In the main paper, we show how the composition of the top ten cluster families in the United States and Germany changes over time. Complementing this picture, Figure S11 and Figure S12 show the evolution of the top hundred cluster families in both countries. The figures are generated using a procedure developed in [1], where it is applied to data containing only statutes.

Profiles
In the main paper, we show the profiles of selected statutes and regulations in a case study on financial regulation. Complementing this analysis, Figure S13 depicts the macro-level trends we observe in the United States data as indicated by the individual and pairwise joint distributions of the changes (value in 2019 minus value in 1998) in seven of our ten indicators, for all USC and CFR chapters that exist in both 1998 and 2019. By excluding chapters added after 1998, we ensure that we measure growth over the  Figure S10. Pairwise similarity between 100 clusterings with 100 as the preferred number of clusters, depicted as kernel-density estimates rather than frequency histograms to reduce visual clutter.
same interval for all chapters. Figure S13 reveals, inter alia, that the change distributions are generally more concentrated for statutes than they are for regulations, and that the joint change distribution of binary in-degree and items on section level best (visually) separates statutes and regulations. Furthermore, outliers in the (growth of) size and self-referentiality are mostly regulations, while outliers in in-degree indicators are mostly statutes, and outliers in out-degree indicators are of mixed document types. For illustration, Table S6 lists the USC or CFR chapters that experienced the largest absolute increase from 1998 to 2019 in one of our ten indicators.
The profiles of individual statutes and regulations primarily serve to track their development over time. Over the course of the analysis, however, we found that they are also helpful in highlighting potential problems with our dataset. As visualized in Figure S14 Investigating these shifts, we find that they are indeed contained in the data. In 2003, large parts of 17 CFR Ch. II are contained within a tag designated <SUPERSED>, which-based on a comment in the document type definition-is used for "superseded material". Since the relevant parts reappear in  Figure S12. Federal statutes and regulations in Germany by cluster (1998-2019), with cluster numbers to enable content inspection. Each block in each year represents a cluster. Clusters are ordered from left to right by decreasing size (measured in tokens) and colored by the cluster family to which they belong, where clusters not in one of the 20 largest cluster families are colored in alternating greys. Small clusters are summarized in one miscellaneous cluster, which is always the rightmost cluster and colored in light grey.  A separate issue is indicated by the sharp spike in weighted in-degree, accompanied by a modest rise in binary in-degree, in 2009. Upon closer inspection, this increase stems from the fact that our data for this year contains a separate node titled "17 CFR Ch. II (CONTINUED)" indicating that--as happens from time to time--the raw data contains two separate files that both contain text for the chapter in question. We estimate the overall effect of this unexpected phenomenon, which occurs a total of fifteen times in the data, 13 to be negligible for the overall analysis. However, this needs to be addressed in future work, and it serves as a reminder that, despite the best efforts of the bodies managing the codification processes, the data quality can still be improved. In the past, the respective public offices have been open toward and grateful for deficiencies pointed out by quantitative researchers, and we will work with the U.S. Government Publishing Office to remove the errors we identify.