Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skill B: Network Analysis

This is the second Skill for the Network-aware Daily arXiv Research Briefing Agent. It consumes paper metadata from Skill A and produces research-network analysis for daily briefings.

What It Does

  • Builds a coauthorship graph from paper authors.
  • Builds a paper-similarity graph from embeddings or a TF-IDF fallback.
  • Runs Louvain and Label Propagation community detection.
  • Computes PageRank, betweenness, and degree centrality.
  • Identifies bridge authors with betweenness * (1 - clustering_coefficient).
  • Exports JSON plus static PNG visualizations.

Install

python -m pip install -e ".[dev]"

The core implementation uses only NetworkX and Matplotlib. PyVis is optional:

python -m pip install -e ".[interactive]"

Quickstart

skill-b-network analyze --input examples/papers.json --output outputs/network_analysis.json

Local module form:

python -m skill_b_network.cli analyze --input examples/papers.json --output outputs/network_analysis.json

The command writes:

  • outputs/network_analysis.json
  • outputs/artifacts/coauthorship_network.png
  • outputs/artifacts/paper_similarity_network.png
  • outputs/artifacts/community_method_comparison.png
  • outputs/artifacts/interactive_network.html if PyVis is installed

Input Schema

Required top-level fields:

  • run_id: run identifier used in reports.
  • papers_metadata[]: paper records.

Required paper fields:

  • paper_id
  • arxiv_id
  • title
  • abstract
  • authors
  • categories
  • published_at

Optional fields:

  • embeddings: {paper_id: [float, ...]}.
  • history_snapshots: previous-day snapshots for future dynamic metrics.
  • graph_params: overrides for defaults.

Default graph params:

{
  "k_neighbors": 5,
  "sim_threshold": 0.55,
  "coauthor_weight": "count",
  "community_methods": ["louvain", "label_propagation"],
  "random_seed": 42,
  "top_n": 10,
  "visualization": {
    "max_nodes": 60,
    "label_top_n": 30,
    "depth": 1,
    "seed_nodes": 8,
    "min_component_size": 1
  }
}

Visualization params affect the PNG/HTML artifacts only; the analysis JSON still contains the full graph.

  • max_nodes: maximum nodes drawn in one static network image.
  • label_top_n: highest-ranked nodes that receive text labels.
  • depth: neighbor expansion depth from the highest-ranked seed nodes when the full graph is too large.
  • seed_nodes: number of central seed nodes used before depth expansion.
  • min_component_size: hides tiny disconnected components in images when set above 1.

Output Schema

The output JSON contains:

  • graphs: graph statistics for coauthorship and paper-similarity graphs.
  • coauthor_edges: weighted author-author edges.
  • paper_sim_edges: weighted paper-paper similarity edges.
  • communities: method-specific assignments, community counts, and modularity.
  • centrality: PageRank, betweenness, and degree centrality values.
  • top_influencers: top authors and papers by PageRank.
  • top_bridges: top bridge authors with explainability fields.
  • emerging_communities: paper community summaries for the daily briefing.
  • network_stats: repeated graph stats for downstream compatibility.
  • artifacts: generated figure paths.
  • warnings: recoverable data-quality and fallback messages.

Tests

python -m pytest

Interface With Skill A

Skill A should pass its ranked paper metadata and embeddings to this Skill. If Skill A has not implemented embeddings yet, this Skill still runs by using TF-IDF cosine similarity over title + abstract.

Skill B does not fetch arXiv data and does not summarize papers. It only analyzes metadata and vectors provided by the upstream retrieval/summarization layer.

Known Limits

  • Author disambiguation is simple normalized-name matching.
  • Louvain and Label Propagation are internal community estimates, not ground truth.
  • Dynamic metrics require historical snapshots; without them, growth_7d, novelty, and bridge_pressure are null.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages