MLKN.lab · Method
Method
How we build, classify, and model the knowledge networks.
Overview
A Polyhierarchical, Data-Driven Approach
The operational architecture of MLKN.lab relies on a formalized, multi-layered data ingestion and network-synthesis pipeline designed to map the global topology of science. Moving away from rigid, mono-hierarchical taxonomies, our methodology leverages a high-fidelity, polyhierarchical design that accommodates the cross-disciplinary fluidity of modern discovery.
By ingesting large-scale bibliometric data from OpenAlex, the pipeline normalizes and maps complex scientific metadata across five discrete ontological layers. Through co-occurrence analysis, topological graph algorithms, and rigorous modularity validation, MLKN.lab extracts structural insights from chaotic data, rendering a reproducible, open-access, and interactive geometric representation of human knowledge.
MLKN-lab’s methodology combines bibliometrics, network science, and hierarchical classification to map the structure of scientific knowledge. Our approach is: data-driven, reproductible, open, and interdiscilplinar.
Methodological Foundations
Network Science, Multilayer Networks, Hypergraphs, Semantic Web, Collective Intelligence
Network Science
Applying graph theory and network analysis to model scientific knowledge. MLKN.lab represents disciplines, subdisciplines, and concepts as nodes and edges, enabling the study of their topological properties.
Key Tools:
- Graph Centrality: Identifying key nodes in knowledge networks.
- Community Detection: Finding clusters of related concepts.
- Path Analysis: Tracing connections between distant fields.
Multilayer Networks
Modeling scientific knowledge as multilayer networks, where each layer represents a distinct dimension (e.g., disciplines, time, or scale). MLKN.lab uses multilayer network analysis to study how knowledge evolves across layers.
Key Tools:
- Layer Interdependencies: Analyzing connections between layers.
- Cross-Layer Dynamics: Studying how changes in one layer affect others.
- Structural Controllability: Identifying key nodes that influence the entire network.
Hypergraphs
Representing scientific knowledge as hypergraphs, where edges can connect any number of nodes. MLKN.lab uses hypergraphs to model polyhierarchical relationships in knowledge systems.
Key Tools:
- Hypergraph Neural Networks: Applying deep learning to hypergraphs.
- Structure Preservation: Maintaining relationships in high-dimensional data.
- Topological Analysis: Studying the geometric properties of hypergraphs.
Semantic Web
Using semantic technologies to model the meaning of scientific concepts. MLKN.lab integrates ontologies, taxonomies, and knowledge graphs to enable semantic reasoning over scientific knowledge.
Key Tools:
- RDF/OWL: Formal representations of knowledge.
- Linked Data: Connecting knowledge across the web.
- SPARQL: Querying semantic knowledge bases.
Collective Intelligence
Studying how knowledge emerges from communities. MLKN.lab explores collaborative problem-solving, swarm intelligence, and crowd wisdom to understand how groups create and diffuse knowledge.
Key Tools:
- Social Network Analysis: Mapping collaborations.
- Cognitive Modeling: Simulating group decision-making.
- Swarm Algorithms: Optimizing collective behavior.
Technical Stack: Applications & Libraries
The tools powering MLKN.lab’s data processing, analysis, and visualization.
🔹 Python: The Backbone of Data Processing
Definition: Python is a high-level, open-source programming language widely used in data science, machine learning, and network analysis due to its readability, extensibility, and rich ecosystem of libraries.
Why Python?
- Ecosystem: Libraries like Pandas, NetworkX, and Matplotlib are industry standards for data manipulation and analysis.
- Compatibility: Seamless integration with OpenAlex API and other data sources.
- Reproducibility: Scripts can be easily shared and reused (via Jupyter Notebooks or GitHub).
Key Features Used in MLKN.lab:
| Feature | Use Case in MLKN.lab | Example Libraries/Tools |
|---|---|---|
| Data Cleaning | Normalizing OpenAlex metadata (e.g., author names, discipline labels). | Pandas, NumPy |
| Automation | Batch processing of large datasets. | Python scripts, Cron jobs |
| API Interactions | Fetching data from OpenAlex, ORKG, Wikidata. | requests, aiohttp |
| Modularity | Organizing code into reusable functions. | Custom Python modules |
Example Code Snippet:
import pandas as pd
import requests
# Fetch data from OpenAlex API
response = requests.get("https://api.openalex.org/works?filter=publication_year:2020")
data = response.json()
df = pd.DataFrame(data["results"]) # Convert to DataFrame for analysis
Learn More: Python Official Website | Pandas for Data Science
🔹 Pandas: Data Cleaning & Transformation
Definition: Pandas is a Python library for data manipulation and analysis, offering high-performance, easy-to-use data structures (e.g., DataFrames) and tools.
Why Pandas?
- Efficiency: Optimized for large datasets (e.g., OpenAlex’s 200M+ works).
- Flexibility: Handles missing data, duplicates, and complex transformations seamlessly.
- Integration: Works with NetworkX, Matplotlib, and PyVis for end-to-end workflows.
Key Features Used in MLKN.lab:
| Feature | Use Case in MLKN.lab | Example Code |
|---|---|---|
| Data Cleaning | Removing duplicates, standardizing labels. | df.drop_duplicates() |
| Filtering | Extracting relevant disciplines/subfields. | df[df["discipline"] == "AI"] |
| Aggregation | Counting papers per discipline. | df.groupby("discipline").size() |
| Merging | Combining datasets (e.g., OpenAlex + Scopus). | pd.merge(df1, df2, on="id") |
Example Workflow:
- Load raw OpenAlex data into a DataFrame.
- Clean (remove duplicates, normalize text).
- Transform (extract disciplines, count co-occurrences).
- Export to NetworkX for graph analysis.
Learn More: Pandas Documentation
🔹 NetworkX: Network Construction & Analysis
Definition: NetworkX is a Python library for creating, manipulating, and studying the structure, dynamics, and functions of complex networks.
Why NetworkX?
- Standard for Network Science: Used in academic research and industry.
- Algorithms: Built-in functions for centrality, clustering, and path analysis.
- Visualization: Basic plotting capabilities (complemented by D3.js for interactivity).
Key Features Used in MLKN.lab:
| Feature | Use Case in MLKN.lab | Example Code |
|---|---|---|
| Graph Construction | Creating nodes (disciplines) and edges (relationships). | G = nx.DiGraph() |
| Centrality Metrics | Identifying key disciplines (e.g., hubs). | nx.degree_centrality(G) |
| Community Detection | Finding clusters of related disciplines. | nx.algorithms.community.greedy_modularity_communities(G) |
| Path Analysis | Tracing connections between fields. | nx.shortest_path(G, "AI", "Ethics") |
Example: Building a Knowledge Graph
import networkx as nx
# Create a directed graph
G = nx.DiGraph()
# Add nodes (disciplines)
G.add_node("Computer Science", type="domain")
G.add_node("AI", type="discipline", parent="Computer Science")
# Add edges (relationships)
G.add_edge("Computer Science", "AI", relationship="hierarchical")
# Calculate centrality
centrality = nx.degree_centrality(G)
print(f"Most central discipline: {max(centrality, key=centrality.get)}")
Learn More: NetworkX Documentation
🔹 Matplotlib/Seaborn: Static Visualization
Definition: Matplotlib is a Python library for creating static, publication-quality visualizations, while Seaborn provides a high-level interface for statistical graphics.
Why Matplotlib/Seaborn?
- Exploratory Analysis: Quickly visualize distributions, correlations, and trends in the data.
- Publication-Ready: Export graphs in high resolution (PNG, SVG, PDF).
- Complement to D3.js: Used for static analyses (e.g., histograms of discipline sizes), while D3.js handles interactivity.
Key Features Used in MLKN.lab:
| Feature | Use Case in MLKN.lab | Example Code |
|---|---|---|
| Histograms | Distribution of papers per discipline. | plt.hist(df["discipline"]) |
| Heatmaps | Co-occurrence matrices between disciplines. | sns.heatmap(co_occurrence_matrix) |
| Network Plots | Basic static graphs (before D3.js). | nx.draw(G, with_labels=True) |
Example: Discipline Distribution
import matplotlib.pyplot as plt
df["discipline"].value_counts().plot(kind="bar", title="Papers per Discipline")
plt.xlabel("Discipline")
plt.ylabel("Number of Papers")
plt.show()
Learn More: Matplotlib Gallery | Seaborn Tutorial
🔹 PyVis: Interactive Network Visualization (Python Side)
Definition: PyVis is a Python library that generates interactive network visualizations in HTML/JS using Vis.js (complementary to D3.js).
Why PyVis?
- Rapid Prototyping: Generates interactive visualizations in a few lines of code.
- Exportable: Produces standalone HTML files (no server required).
- Complement to D3.js: Used for quick visualizations during development.
Key Features Used in MLKN.lab:
| Feature | Use Case in MLKN.lab | Example Code |
|---|---|---|
| Interactive Graphs | Visualizing small/medium networks. | net.show("network.html") |
| Node Customization | Color nodes by domain/discipline. | net.show_buttons(filter_=["physics"]) |
| Edge Customization | Style edges by relationship type. | net.show_edges(labels=True) |
Example: Visualizing a Sub-Network
from pyvis.network import Network
net = Network(notebook=True, height="750px", width="100%")
net.from_nx(G) # Convert NetworkX graph to PyVis
net.show("knowledge_network.html")
Learn More: PyVis Documentation
🔹 D3.js: The Heart of MLKN.hypergraph’s Interactive Visualization
Definition: D3.js (Data-Driven Documents) is a JavaScript library for producing dynamic, interactive data visualizations in web browsers. It binds data to DOM elements and applies transformations to the document based on that data.
Why D3.js?
- Flexibility: Full control over every pixel (unlike PyVis, which is more limited).
- Performance: Optimized for large graphs (320K+ connections in MLKN.hypergraph).
- Interactivity: Supports zoom, drag-and-drop, tooltips, and clicks to explore the data.
- Force-Directed Layout: Ideal algorithm for visualizing complex networks (e.g., scientific knowledge).
Key Concepts in MLKN.hypergraph:
| Concept | Description | Implementation in D3.js |
|---|---|---|
| Force-Directed Layout | Simulates a physical system where nodes repel each other and links attract. | d3.forceSimulation() + d3.forceLink() |
| Nodes | Represent domains/disciplines. | circle SVG elements with r (radius) based on centrality. |
| Edges | Represent hierarchical/semantic relationships. | line SVG elements with stroke-width based on weight. |
| Tooltips | Show metadata on hover (e.g., name, number of subdisciplines). | d3.tip() or custom HTML tooltips. |
| Zoom/Pan | Explore the graph at different scales. | d3.zoom() + d3.drag() |
| Color Coding | Nodes colored by domain (e.g., red for Cognitive Sciences). | d3.scaleOrdinal() for domain colors. |
How the Force-Directed Layout Works:
- Initialization: Nodes are placed randomly in the SVG space. Links are represented as springs (shorter links = stronger forces).
- Simulation:
forceManyBody: Repulsion between all nodes (avoids overlaps). Key Parameter:strength(e.g.,-100for strong repulsion).forceLink: Attraction along links (simulates springs). Key Parameter:distance(e.g.,50for ideal node spacing).forceCenter: Attracts all nodes to the SVG center. Key Parameter:xandy(center coordinates).
- Stabilization: The simulation balances out after a few iterations (nodes stabilize). Key Parameter:
alphaTarget(lower = faster stabilization).
Example Code (Simplified):
// 1. Set up the SVG
const svg = d3.select("body").append("svg")
.attr("width", 800)
.attr("height", 600);
// 2. Load the data (nodes and links)
d3.json("data/knowledge-network.json").then(data => {
const nodes = data.nodes;
const links = data.links;
// 3. Create the simulation
const simulation = d3.forceSimulation(nodes)
.force("link", d3.forceLink(links).id(d => d.id).distance(50))
.force("charge", d3.forceManyBody().strength(-100))
.force("center", d3.forceCenter(400, 300));
// 4. Draw the links
const link = svg.append("g")
.selectAll("line")
.data(links)
.enter().append("line")
.attr("stroke", "#999")
.attr("stroke-width", 1);
// 5. Draw the nodes
const node = svg.append("g")
.selectAll("circle")
.data(nodes)
.enter().append("circle")
.attr("r", d => Math.sqrt(d.size) * 5) // Size based on centrality
.attr("fill", d => color(d.domain)); // Color by domain
// 6. Update positions on each tick
simulation.on("tick", () => {
link
.attr("x1", d => d.source.x)
.attr("y1", d => d.source.y)
.attr("x2", d => d.target.x)
.attr("y2", d => d.target.y);
node
.attr("cx", d => d.x)
.attr("cy", d => d.y);
});
});
Advantages for MLKN.hypergraph:
- Scalability: Handles hundreds of thousands of nodes/links without lag.
- Customization: Allows adding labels, legends, and custom interactions.
- Integration: Works with React, Vue.js, or vanilla JS (compatible with your current site).
Learn More: D3.js Official Website | Force-Directed Layout Tutorial
Tools and Techniques
OpenAlex, ORKG, Wikidata
OpenAlex
A free, open catalog of 200M+ scholarly works, including papers, authors, institutions, and concepts. MLKN.lab uses OpenAlex as its primary data source for building its polyhierarchical knowledge hypergraph.
Key Features:
- Comprehensive Metadata: Titles, authors, abstracts, citations, and more.
- Interconnected Data: Relationships between papers, authors, and institutions.
- Open Access: Free to use with no restrictions.
Open Research Knowledge Graph (ORKG)
A collaborative, open knowledge graph that represents research contributions as interconnected nodes. MLKN.lab aligns with ORKG’s mission to compare, analyze, and discover research across disciplines.
Key Features:
- Research Contributions: Papers, datasets, software, and more.
- Comparative Analysis: Compare research across fields.
- Open Data: Free and open-access.
Wikidata
A free, open knowledge graph that connects data from Wikipedia and other Wikimedia projects. MLKN.lab uses Wikidata to integrate and analyze diverse datasets.
Key Features:
- Structured Data: Millions of interconnected concepts.
- Open Access: Free and open for all.
- Linked Data: Connects to the broader semantic web.
OpenAlex: A Strategic Choice
Explanation of our strategic choice for OpenAlex
Why OpenAlex?
At MLKN.lab, we believe that knowledge should be open, accessible, and sovereign. That’s why we built our polyhierarchical knowledge hypergraph on OpenAlex, a free, open catalog of scholarly papers that democratizes access to research metadata.
OpenAlex is more than a database—it’s a movement. By providing comprehensive, interconnected, and up-to-date data on publications, authors, and institutions, OpenAlex enables tools like MLKN.lab to map, analyze, and simulate the structure of scientific knowledge without relying on commercial, restrictive databases.
We’re thrilled to see institutions like the CNRS—one of the world’s leading research organizations— transitioning to OpenAlex as part of their commitment to open science and research sovereignty. This decision validates our approach and signals a new era for research—one where knowledge is free, transparent, and collaborative.
Data Collection
Sources and Preprocessing
Primary Data Source: OpenAlex
We use OpenAlex, a free and open catalog of scholarly papers, authors, venues, and institutions. OpenAlex provides:
- Over 200M works (papers, preprints, etc.).
- Metadata (titles, abstracts, authors, venues, citations).
- Concepts and topics extracted from papers.
Supplementary Data Sources
To enrich our dataset, we supplement OpenAlex with:
- Scopus: For citation and thematic data.
- MeSH: For biomedical classifications.
- IEEE Thesaurus: For engineering and computer science.
Data Preprocessing
Raw data is cleaned and standardized to ensure consistency:
- Deduplication: Removing duplicate entries.
- Normalization: Standardizing names, terms, and classifications.
- Disambiguation: Resolving ambiguous author or venue names.
Data Processing & Analysis
FROM RAW DATA TO STRUCTURED KNOWLEDGE NETWORKS
The data processing pipeline transforms raw OpenAlex data into a structured, polyhierarchical knowledge network ready for analysis and visualization.
Key Steps:
- Data Ingestion:
- Fetching data from OpenAlex API (e.g., works, authors, concepts).
- Supplementary sources: Scopus, MeSH, IEEE Thesaurus (to enrich classifications).
- Cleaning & Normalization:
- Deduplication: Removing duplicate entries (e.g., same paper in multiple sources).
- Standardization: Normalizing discipline names (e.g., "AI" → "Artificial Intelligence").
- Disambiguation: Resolving ambiguous author names (e.g., "J. Smith" → "John Smith, Harvard").
- Transformation:
- Extracting Hierarchies: Identifying parent-child relationships (e.g., "Neuroscience" → "Cognitive Neuroscience").
- Co-Occurrence Analysis: Counting how often disciplines/concepts appear together.
- Network Construction: Converting cleaned data into a graph structure (nodes = disciplines, edges = relationships).
Tools Used:
- Python + Pandas: For cleaning and transformation.
- NetworkX: For building the graph.
- Jupyter Notebooks: For documenting each step (reproducibility).
Example Workflow:
# 1. Load raw data
df = pd.read_csv("data/raw/openalex_works.csv")
# 2. Clean duplicates
df = df.drop_duplicates(subset=["doi"])
# 3. Normalize discipline names
discipline_mapping = {"AI": "Artificial Intelligence", "CS": "Computer Science"}
df["discipline"] = df["discipline"].replace(discipline_mapping)
# 4. Extract co-occurrences
co_occurrence = pd.crosstab(df["discipline1"], df["discipline2"])
# 5. Save processed data
df.to_csv("data/processed/disciplines_clean.csv", index=False)
Classification
Organizing Knowledge into Hierarchies
Ontological Layers
We organize knowledge into 5 ontological layers:
- Core Discipline Domains: 6 high-level domains (e.g., Natural Sciences, Social Sciences).
- Academic Disciplines: 25 fields (e.g., Psychology, Computer Science).
- Subdisciplines: 235 specialized areas (e.g., Cognitive Psychology, AI Ethics).
- Core Thematic Domains: Thematic groupings within subdisciplines.
- Main Concepts: Specific topics or ideas (e.g., "Attention", "Neural Networks").
Classification Standards
Our hierarchy aligns with global standards:
- OECD Frascati Manual: For discipline classifications.
- UNESCO Fields of Science: For broad domain groupings.
- MeSH and IEEE Thesaurus: For specialized fields.
Polyhierarchical Design
Unlike traditional hierarchies, our structure is polyhierarchical:
- A concept can belong to multiple disciplines (e.g., AI Ethics → Computer Science + Philosophy).
- Disciplines can be grouped under multiple domains (e.g., Neuroscience → Natural Sciences + Health Sciences).
- This reflects the interdisciplinary nature of modern science.
Network Construction
Mapping Connections Between Disciplines
Co-Occurrence Analysis
We identify connections between disciplines by analyzing:
- Shared concepts: Topics that appear in multiple disciplines.
- Citation networks: How often papers from one discipline cite another.
- Author collaborations: Researchers working across disciplines.
Network Metrics
We use graph theory to quantify the structure of knowledge:
- Centrality: Identifying key disciplines and concepts.
- Modularity: Detecting communities or clusters.
- Bridges: Mapping connections between fields.
Visualization
Networks are visualized using interactive tools:
- Force-directed layouts: For exploring connections.
- Hierarchical views: For navigating layers.
- Color-coding: By domain, discipline, or subdiscipline.
Validation
Ensuring Accuracy and Relevance
Expert Review
Our hierarchy and networks are reviewed by domain experts to ensure:
- Accuracy: Disciplines and subdisciplines are correctly classified.
- Relevance: Connections reflect real-world interdisciplinary links.
- Completeness: No major fields or connections are missing.
Network Metrics
We validate the structure using:
- Modularity scores: To assess the strength of disciplinary clusters.
- Centrality measures: To identify key disciplines.
- Path analysis: To trace connections between fields.
Reproducibility
All our methods and datasets are open and reproducible:
- Code: Available on GitHub.
- Data: Publicly accessible datasets.
- Documentation: Detailed methodologies and tutorials.
Reproducibility & Open Science
COMMITMENT TO TRANSPARENCY AND ACCESSIBILITY
At MLKN.lab, we are committed to open science principles: transparency, reproducibility, and accessibility. All our data, code, and methodologies are publicly available.
Key Components:
- Open Data:
- Zenodo: Datasets with DOI for citation (e.g., 10.5281/zenodo.21363227).
- GitHub: Raw and processed data (via Git LFS for large files).
- Open Code:
- GitHub Repository: FrancoisPapin/MLKN-lab.
- Jupyter Notebooks: Step-by-step tutorials for data cleaning, analysis, and visualization.
- License: MIT (allows free reuse).
- Open Methodology:
- Documentation: Detailed explanations of every step (from data collection to visualization).
- Tutorials: Guides for reproducing our results (e.g.,
README.md,tutorials/folder).
How to Reproduce Our Results:
- Clone the Repository:
git clone https://github.com/FrancoisPapin/MLKN-lab.git cd MLKN-lab - Install Dependencies:
pip install -r requirements.txt - Download Data:
- Download datasets from Zenodo or use
git lfs pullfor Git LFS files.
- Download datasets from Zenodo or use
- Run Notebooks:
- Open
notebooks/data_cleaning.ipynbin Jupyter to reproduce the data processing.
- Open
Learn More: Open Science Principles | FAIR Principles
Tools & Code
Software for Building and Analyzing Knowledge Networks
Data Processing Pipeline
A Python-based pipeline for cleaning, classifying, and structuring raw data from OpenAlex and other sources.
Network Analysis Scripts
Scripts for analyzing knowledge networks, including centrality metrics, community detection, and visualization.
Interactive Visualization Tools
Tools for exploring knowledge networks, including force-directed layouts and hierarchical views.
Code & Implementation
FROM RAW DATA TO INTERACTIVE VISUALIZATION
🔹 Repository Structure
MLKN-lab/
├── data/ # Raw and processed data (Git LFS)
│ ├── raw/ # Raw OpenAlex data
│ └── processed/ # Cleaned data (CSV/JSON)
├── notebooks/ # Jupyter Notebooks (step-by-step tutorials)
│ ├── data_cleaning.ipynb
│ └── network_analysis.ipynb
├── src/ # Source code
│ ├── python/ # Data processing (Pandas, NetworkX)
│ └── js/ # D3.js code for MLKN.hypergraph
├── docs/ # Documentation
└── README.md # Setup instructions
🔹 How to Contribute
- Fork the Repository: Create your own copy on GitHub.
- Clone Locally:
git clone https://github.com/FrancoisPapin/MLKN-lab.git - Create a Branch:
git checkout -b new-feature - Commit Changes:
git commit -m "Add new classification layer" - Submit a Pull Request: Propose your changes for review.
🔹 Key Files
| File/Folder | Description | Link |
|---|---|---|
data/raw/ |
Raw OpenAlex data (via Git LFS). | Zenodo Dataset |
notebooks/ |
Jupyter Notebooks for data cleaning and analysis. | View on GitHub |
src/python/ |
Python scripts (Pandas, NetworkX). | View on GitHub |
src/js/ |
D3.js code for MLKN.hypergraph. | View on GitHub |
README.md |
Instructions for setup and usage. | View on GitHub |
Explore Our Methodology
Dive deeper into our data, code, and tools.
Get in Touch
Connect with us to collaborate or learn more about MLKN.lab.