跳到正文

From Code Archival to Knowledge Graph: Bridging Software Heritage, COAR Notify and Wikidata

摘要

一项工作提出将 Software Heritage 的代码存档与 Wikidata 知识图谱对接,并借助 COAR Notify 打通二者。Software Heritage 截至 2025 年 12 月已存档超 270 亿个唯一源文件、逾 4.21 亿个项目,约 2 PB 数据,其 SWHID 已纳入 ISO/IEC 18670:2025 标准。

摘要由模型根据原文撰写,以原文为准。

正文 · 原文

Software Heritage (SWH) Di Cosmo and Zacchiroli (2023) was launched in 2016 to collect, preserve, and share all publicly available software source code Di Cosmo and Zacchiroli (2017); Abramatic et al. (2018). As of December 2025, it archives more than 27 billion unique source files from over 421 million projects, totalling roughly 2 petabytes Software Heritage (2026).

SWH occupies a distinct place among code platforms. Forges such as GitHub or GitLab are commercial services that host active development, where projects can be renamed, moved, or deleted at will, while deposit repositories such as Zenodo mint a DOI for a snapshot that authors upload themselves. SWH is instead a non-profit archive, initiated by Inria in partnership with UNESCO and funded by public and private sponsors Di Cosmo and Zacchiroli (2017); Abramatic et al. (2018): it hosts no development, but proactively crawls forges and package managers and preserves their full history. Replicated to independent mirrors, any archived artefact can be retrieved, redistributed, and cited through its intrinsic identifier wherever it was first published, so the code behind a result stays verifiable without depending on a single provider.

The archive is structured as a five-level Merkle DAG Abramatic et al. (2018); Pietri et al. (2019); Di Cosmo et al. (2020) representing contents, directories, revisions, releases, and snapshots, rooted at origins Pietri et al. (2019). Because the graph is content-addressed, identical files collapse into a single node shared across all projects, enabling global deduplication and a stable identity model. This design ensures resilience against hosting platform closures: when Gitorious and Google Code shut down, SWH retrieved and preserved full copies of their repositories Di Cosmo and Zacchiroli (2017); Di Cosmo et al. (2020).11 1 See Software Heritage, Software is fragile: https://www.softwareheritage.org/mission/software-is-fragile/.

Every archived object receives a SWHID (SoftWare Hash IDentifier), an intrinsic identifier derived directly from its content, rendering it independent of hosting platforms and immune to link rot Di Cosmo et al. (2020); Di Cosmo (2020). SWHIDs are codified under the ISO/IEC 18670:2025 standard ISO/IEC (2025) and supported via the Wikidata property P6138. Section 2.1 contrasts the intrinsic SWHID with extrinsic identifiers, such as Wikidata Q-items and DOIs (including identifier systems like RRID Bandrowski et al. (2016)), which attach at coarser, human-meaningful levels, such as projects or releases. The archive also supports research on programming-language evolution Desmazières et al. (2025), code language models trained on The Stack v2 Lozhkov et al. (2024), reproducible deployment Courtès et al. (2024), and cybersecurity Barais et al. (2025), and the UNESCO Recommendation on Open Science UNESCO (2021) lists open source software and source code among the pillars of open scientific knowledge.

2.2 Wikidata

Wikidata is a collaborative, multilingual knowledge base serving as the central hub of the Linked Open Data cloud Scharpf et al. (2026); Vrandečić and Krötzsch (2014); Vrandečić et al. (2023). It is structured into subject-property-value triples, which can be qualified and equipped with references to track provenance. This suits software metadata, which evolves across versions, although curating such a graph remains challenging Ley (2009)(Groth et al., 2023, §3.8).

Software items in Wikidata are modelled as instances of software (Q7397) and its subclasses, using established properties such as source code repository (P1324), DOI (P356), and SWHID (P6138).

This article-versus-software distinction is reflected in Wikidata’s physical infrastructure. In 2025, the Wikimedia Foundation split the Wikidata Query Service (WDQS) into two SPARQL endpoints to overcome backend scaling limits Lubiana et al. (2025). One endpoint serves the scholarly graph, which is primarily WikiCite data Taraborelli et al. (2016) and accounts for over half of Wikidata’s triples Lubiana et al. (2025), while the main endpoint hosts software items (Q7397). As of July 2026, queries on WDQS that join a paper to its corresponding software must still span both graphs via internal federation, an architectural constraint we address in Section 4.4.

2.3 COAR Notify and the Reconciliation Trigger


注意转载授权 · 阅读原文

来源:arXiv cs.DL 数字图书馆 · arxiv.org

引用原文

Camillo Carlo Pellizzari di San Girolamo, Francesco Tosoni. From Code Archival to Knowledge Graph: Bridging Software Heritage, COAR Notify and Wikidata[EB/OL]. (2026-10-20)[访问日期]. https://arxiv.org/abs/2609.21667.