arXiv:2610.07762cs.SEOct 2026

Manuscript Offprint

arXiv:2610.07762

ES-Trace: Auditing Ethical-Sourcing Disclosure of Code Generation Models Beyond Model Cards

Zhuolin Xu, Haibo Wang, Shin Hwei Tan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ZHUOLIN XU, Concordia University, Canada

HAIBO WANG, Concordia University, Canada

SHIN HWEI TAN, Concordia University, Canada

Code generation models have been increasingly used in software development, but their development raises ethical-sourcing concerns involving intellectual property, privacy, fairness, labour practices, and environmental impact. Although prior work has defined ethical-sourcing criteria for code generation, it remains unclear how much evidence existing models disclose and where that evidence can be found. We introduce ES-Trace, a framework for ethical-sourcing disclosure audits that traces disclosed evidence beyond model cards using the Model Documentation Traceability Graph (MDTG), which represents relationships among models, versions, and documentation artifacts. We apply ES-Trace to 26 models from 10 publishers across 77 documents and 20 ES-CodeGen aspects. Model-card-only auditing yields a mean score of 1.77/5, while resolving the declared references increases it to 2.82/5, with most of the increase arising from documents that the publisher declares in structured metadata. The key findings of our study include: (1) social and labour-related aspects remain poorly documented, even when expanding the audit to the full documentation scope, (2) resolving documentation references substantially increases observed disclosure, raising the mean score from 1.77/5 to 2.82/5, (3) model-card-only audits can mischaracterize release-level disclosure changes, and (4) documentation mismatches can associate evidence with the wrong model or version, highlighting the need for explicit model-version binding and consistency across documentation artifacts. Our study calls for reference-aware ethical-sourcing disclosure audits, explicit model-version binding and consistency across documentation artifacts, and stronger documentation of currently underreported social and labour-related aspects.

CCS Concepts: • Software and its engineering → Documentation; • General and reference → Empirical studies; • Human-centered computing → Collaborative and social computing.

Additional Key Words and Phrases: AI bill of materials, model cards, software supply chain, documentation traceability, ethical sourcing, LLM-as-a-judge

1 Introduction

Large language models (LLMs) are widely used to generate, modify, and maintain software. Their development, however, introduces software supply-chain concerns that extend beyond the behavior of the resulting code [5, 42, 48]. Code generation models depend on training data, human contributors, computational infrastructure, and other resources whose acquisition and management can raise questions about intellectual property, contributor rights, privacy, working conditions, and environmental impact [51]. Legal disputes illustrate these concerns. The GitHub Copilot litigation, for example, raises questions about the use of code from public repositories subject to open-source licenses [14], while other lawsuits challenge the use of copyrighted works for AI training [25]. Environmental impact is another concern: data centers consumed approximately 415 TWh of electricity in 2024, and the International Energy Agency projects demand to reach approximately 945 TWh by 2030, with AI as a major driver [24]. These concerns have motivated the study of Ethically Sourced Code Generation (ES-CodeGen) [51], which considers whether code generation models are developed through ethical and sustainable practices across their supply chain.

ES-CodeGen was defined through a systematic literature review and a survey of 32 practitioners familiar with code generation models [51]. The study identifies 20 aspects spanning subject

Authors' Contact Information: Zhuolin Xu, zhuolin.xu@mail.concordia.ca, Concordia University, Montreal, Quebec, Canada; Haibo Wang, haibo.wang@mail.concordia.ca, Concordia University, Montreal, Quebec, Canada; Shin Hwei Tan, shinhwei.tan@concordia.ca, Concordia University, Montreal, Quebec, Canada.

Xu et al.

rights, equity, accountability, intellectual property rights, code quality, labour rights, environmental sustainability, and other ethical dimensions. However, important questions about the real-world disclosure practices of existing code generation models remain unanswered, particularly whether we can systematically evaluate the evidence they disclose for these aspects. Developers rarely disclose such evidence through the model itself. Instead, they distribute it across model cards, technical papers, dataset documentation, repositories, governance documents, and other development artifacts. We define an ethical-sourcing disclosure audit as a systematic examination of publicly disclosed evidence for these aspects and its supporting documentation. Such an audit must identify relevant disclosures and provide an explanation for each assessment. This poses a challenge: how can an audit systematically identify, attribute, and validate the evidence needed to assess an aspect?

An AI Bill of Materials (AIBOM) specifies an AI system’s components, dependencies, provenance, and supply-chain metadata [39, 44]. For code generation models, AIBOMs can link models to training datasets, documentation, and other supply-chain artifacts. Existing generators such as ALOHA [13] and the OWASP GenAI Security Project AIBOM Generator [41] capture such metadata and references, but do not assess the contents of referenced artifacts. For example, the OWASP generator identifies the technical paper for allenai/OLMo-2-1124-7B-Instruct but reports energy consumption as missing, although the paper reports 131 MWh of pretraining energy and approximately 52 tCO 2_2eq for OLMo 2 7B [46]. Thus, identifying a source does not mean that the evidence it contains has been recovered. Similarly, across our 26 models from 10 publishers, the Hugging Face co2_eq_emissions field is absent from all 26 model cards, although technical papers provide emissions information. Fifteen models reference their own technical report through an arxiv: tag that can be automatically resolved. These cases show that measuring field presence or reference availability can underestimate disclosure when relevant evidence resides in linked artifacts.

In this paper, we address this evidence-scope problem: the absence of a disclosure from a model card or generated AIBOM does not imply that it is absent from the documentation reachable from that model. An audit must traverse the documentation relationships exposed by the model repository, retrieve the resulting artifacts, determine the scope of each artifact, and assess whether its contents provide evidence for the audited model and aspect. This requires addressing three challenges. First, disclosure is distributed across documentation. Relevant evidence can appear in model cards, technical papers, dataset cards, code repositories, organization documents, and other artifacts. An audit limited to the model card can therefore miss evidence that is publicly available through declared references. Second, references do not establish evidence scope. Organizations can share documents across model families, variants can inherit documentation from base models, and references can appear in metadata fields or the card text. Resolving a reference is therefore insufficient: the audit must determine which model, variant, and release the target artifact describes before using its contents as evidence. Third, documentation evolves independently of model releases. Developers can add, remove, or revise disclosures without changing the underlying model, while a single document can describe multiple releases or variants. An audit must therefore bind each document to the release it describes before comparing disclosure across releases.

To address these challenges, we propose ES-Trace, a framework for ethical-sourcing disclosure audits that traces and assesses documented evidence. ES-Trace builds a Model Documentation Traceability Graph (MDTG), which connects publishers, models, and documents, records how each document is referenced and whether it is first- or third-party, and links models through base-model, release, and size relations. MDTG preserves the relationships needed to trace evidence across related documentation and to expand the documentation available to an audit beyond the model card. ES-Trace then applies an evidence-grounded measurement to assess the evidence available at each scope. For each document and ES-CodeGen aspect, an LLM answers five binary evidence questions and provides an evidence snippet for each Yes. ES-Trace derives the aspect score from these answers, and post-hoc evidence checks reject a small set of mechanically identifiable cases in which the snippet does not support the answer. Separating evidence extraction, score derivation, and validation makes each assessment traceable to its supporting documentation.

Using ES-Trace, we conduct a systematic study of ethical-sourcing disclosure across 26 code generation models, including 15 code-generation-specific models and 11 general-purpose models that support code generation. The study covers 77 documents and 1,447 document-aspect pairs. Our results show that model-card-only evaluation underestimates disclosed ethical-sourcing evidence, and that structured documentation relationships can recover substantial missing evidence. The resulting evidence traces also provide a basis for connecting AIBOM components to the documentation and evidence supporting their ethical-sourcing disclosure audit.

This paper makes the following contributions:

Study: We present the first systematic study of ethical-sourcing disclosure across 26 code generation models and 77 documents, characterizing where evidence appears, how documentation references expand disclosure scope, and how evidence varies across related models and releases.

Technique for ethical-sourcing disclosure: We propose ES-Trace, a reference-aware framework that combines the Model Documentation Traceability Graph (MDTG) with an evidence-grounded measurement for evaluating ethical-sourcing disclosure across heterogeneous documentation. ES-Trace uses the MDTG to trace publishers, models, versions, and documentation via reference edges and model relations, and applies a progressive evidence scale of five evidence questions to each document-aspect pair. An LLM evaluates increasingly specific evidence requirements and records supporting snippets, while post-hoc checks verify the snippets against the source documents. This produces traceable aspect-level measurements that distinguish disclosure strength from whether the underlying practice satisfies the aspect.

Evaluation: We apply ES-Trace to 26 code generation models, 10 publishers, and 77 documents, and show that documentation scope and evidence attribution affect ethical-sourcing assessments. Model-card-only evaluation misses substantial disclosed evidence and can reverse the observed balance of regressions and improvements across releases, while resolved references can associate evidence with the wrong model or version when they are not explicitly bound to their targets.

In summary, the key findings from our study include:

Social and labour-related aspects remain poorly documented. At full documentation scope, “Working Conditions”, “Fair Wages”, “Legal Employment”, “Culture”, and “Philosophy and Religion” all score at most 1.62, with 58–85% of models having no evidence for these aspects.

Resolving references substantially increases observed disclosure. Expanding beyond model cards raises the mean from 1.77 to 2.82/5, so model-card-only audits understate the evidence in declared documentation.

Model-card-only audits can mischaracterize release-level disclosure changes. We treat a lower disclosure score for a newer release as a disclosure regression and a higher score as a disclosure improvement. Among large release-level changes, model-card-only auditing identifies 14 regressions and 7 improvements, whereas reference resolution identifies 7 regressions and 16 improvements. Model-card-only auditing also misses 19 of the 40 distinct release-aspect changes. Documentation mismatches can misattribute evidence. We identify variant, artifact, release, and documentation mismatches that associate evidence with the wrong model or version, highlighting the need for explicit model-version binding and consistency across documentation artifacts.

Xu et al.

References (34)