ArticleslgStudy

computer science

Modularity (networks)

Modularity (networks) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Modularity (networks) rather than just read about it. In short: Modularity is a measure of the structure of networks or graphs which measures the strength of division of a network into modules (also called groups, clusters or communities). Networks with high modularity have dense connections between the nodes within modules but sparse connections between nodes in different modules.

Modularity (networks) — main illustration
Modularity (networks) — illustration

Key takeaways

  • Modularity (networks) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Modularity (networks) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Modularity (networks) from memory before moving on to harder problems.

Reference excerpt

Modularity is a measure of the structure of networks or graphs which measures the strength of division of a network into modules (also called groups, clusters or communities). Networks with high modularity have dense connections between the nodes within modules but sparse connections between nodes in different modules. Modularity is often used in optimization methods for detecting community structure in networks. Biological networks, including animal brains, exhibit a high degree of modularity. However, modularity maximization is not statistically consistent, and finds communities in its own null model, i.e. fully random graphs, and therefore it cannot be used to find statistically significant community structures in empirical networks. Furthermore, it has been shown that modularity suffers a resolution limit and, therefore, it is unable to detect small communities.

Motivation Many scientifically important problems can be represented and empirically studied using networks. For example, biological and social patterns, the World Wide Web, metabolic networks, food webs, neural networks and pathological networks are real world problems that can be mathematically represented and topologically studied to reveal some unexpected structural features. Most of these networks possess a certain community structure that has substantial importance in building an understanding regarding the dynamics of the network. For instance, a closely connected social community will imply a faster rate of transmission of information or rumor among them than a loosely connected community. Thus, if a network is represented by a number of individual nodes connected by links which signify a certain degree of interaction between the nodes, communities are defined as groups of densely interconnected nodes that are only sparsely connected with the rest of the network. Hence, it may be imperative to identify the communities in networks since the communities may have quite different properties such as node degree, clustering coefficient, betweenness, centrality, etc., from that of the average network. Modularity is one such measure, which when maximized, leads to the appearance of communities in a given network.

Definition Modularity is the fraction of the edges that fall within the given groups minus the expected fraction if edges were distributed at random. The value of the modularity for unweighted and undirected graphs lies in the range [ − 1 / 2 , 1 ] {\displaystyle [-1/2,1]} . It is positive if the number of edges within groups exceeds the number expected on the basis of chance. For a given division of the network's vertices into some modules, modularity reflects the concentration of edges within modules compared with random distribution of links between all nodes regardless of modules. There are different methods for calculating modularity. In the most common version of the concept, the randomization of the edges is done so as to preserve the degree of each vertex. Consider a graph with n {\displaystyle n} nodes and m {\displaystyle m} links (edges) such that the graph can be partitioned into two communities using a membership variable s {\displaystyle s} . If a node v {\displaystyle v} belongs to community 1, s v = 1 {\displaystyle s_{v}=1} , or if v {\displaystyle v} belongs to community 2, s v = − 1 {\displaystyle s_{v}=-1} . Let the adjacency matrix for the network be represented by A {\displaystyle A} , where A v w = 0 {\displaystyle A_{vw}=0} means there's no edge (no interaction) between nodes v {\displaystyle v} and w {\displaystyle w} and A v w = 1 {\displaystyle A_{vw}=1} means there is an edge between the two. Also for simplicity we consider an undirected network. Thus A v w = A w v {\displaystyle A_{vw}=A_{wv}} . (Multiple edges may exist between two nodes, but here we assess the simplest case). Modularity Q {\displaystyle Q} is then defined as the fraction of edges that fall within group 1 or 2, minus the expected number of edges within groups 1 and 2 for a random graph with the same node degree distribution as the given network. The expected number of edges shall be computed using the concept of a configuration model. The configuration model is a randomized realization of a particular network. Given a network with n {\displaystyle n} nodes, where each node v {\displaystyle v} has a node degree k v {\displaystyle k_{v}} , the configuration model cuts each edge into two halves, and then each half edge, called a stub, is rewired randomly with any other stub in the network, even allowing self-loops (which occur when a stub is rewired to another stub from the same node) and multiple-edges between the same two nodes. Thus, even though the node degree distribution of the graph remains intact, the configuration model results in a completely random network.

… excerpt ends here. Continue reading the full article.

Illustrations

Modularity (networks) illustration
Modularity (networks): Example of modularity measurement and colouring on a scale-free network.
Example of modularity measurement and colouring on a scale-free network.
Modularity (networks): Fig 1. Sample Network corresponding to the Adjacency matrix with 10 nodes, 12 edges.
Fig 1. Sample Network corresponding to the Adjacency matrix with 10 nodes, 12 edges.
Modularity (networks): Fig 2. Network partitions that maximize Q. Maximum Q=0.4896
Fig 2. Network partitions that maximize Q. Maximum Q=0.4896

Worked examples

Example 1 — a first encounter with Modularity (networks)

Start with the simplest possible case. Write down what Modularity (networks) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Modularity (networks) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Modularity (networks) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Modularity (networks)

In research
Modularity (networks) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Modularity (networks) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Modularity (networks) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Algebraic graph theory, Modularity, Network theory, so understanding it makes those chapters shorter.
In everyday life
Look for Modularity (networks) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Modularity (networks) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Modularity (networks) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Modularity (networks) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Modularity (networks) in simple terms?

Modularity is a measure of the structure of networks or graphs which measures the strength of division of a network into modules (also called groups, clusters or communities). Networks with high modularity have dense connections between the nodes within modules but sparse connections between nodes…

Why does Modularity (networks) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Modularity (networks)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Modularity (networks).

Tags

  • Algebraic graph theory
  • Modularity
  • Network theory

Keep exploring