[DRAFT] Web Machine Learning Working Group Charter
This draft charter is available on GitHub. Feel free to raise issues.
The mission of the Web Machine Learning Working Group is to develop APIs for enabling efficient machine learning inference in the browser.
|Charter Status||See the group status page and detailed change history.|
|Start date||[dd monthname yyyy] (date of the "Call for Participation", when the charter is approved)|
|End date||CFP + 2 years|
|Chairs||Anssi Kostiainen (Intel)|
|Team Contacts||Dominique Hazaël-Massieux (0.1 FTE)|
Face-to-face: we will meet during the W3C's annual Technical Plenary week; additional face-to-face meetings may be scheduled by consent of the participants, usually no more than 3 per year.
Motivation and Background
Computer Vision enables computers to gain understanding from images or videos, Natural Language Processing enables interaction between computers and human languages, and Speech Recognition enables computers to recognize and translate spoken language into text. Bringing these experiences to the web in a privacy-preserving manner requires efficient machine learning inference capabilities built into the browser.
Enabling Machine Learning inference in the browser (as opposed e.g. to in the cloud) enhances privacy, since input data such as locally sourced images or video streams stay within the browser's sandbox. Local processing also enables machine learning use cases that require low latency, such as object detection in real-time communications and immersive web experiences.
Currently, machine learning inference in the browser uses WebAssembly and the WebGL graphics API with limited or no access to platform capabilities beneficial for ML such as CPU parallelism, general-purpose GPU, or dedicated ML hardware accelerators.
The Web Machine Learning Working Group develops a Web API aiming to expose generic capabilities to the Web required to provide close-to-native machine learning performance in the browser. This Web API for neural network inference hardware acceleration:
- Allows to construct a neural network computational graph by common building blocks required by well-known model architectures: constant values and base operations such as convolution, pooling, softmax, normalization, fully connected, and activation;
- Allows to compile the neural network to native optimized format for hardware execution;
- Allows to setup input from various sources on the Web, e.g. array buffers and media streams, schedule the asynchronous hardware execution, and retrieve the output when hardware execution completes.
This Working Group puts priority on building blocks required by well-known model architectures such as recurrent neural network (RNN), long short-term memory (LSTM) and transformers in the fields of Computer Vision, Natural Language Processing and Speech Recognition.
The APIs in scope of this group are not be tied to any particular platform and are to be implementable on top of existing major platform APIs, such as Android Neural Networks API, Windows DirectML, and macOS/iOS Metal Performance Shaders and Basic Neural Network Subroutines.
For each high-level building block that decomposes into well-known lower-level operations, the APIs will informatively define a generic emulation path to allow for future extensibility.
It may also work on a higher-level API to load a custom pre-trained Machine Learning model for inference in the browser.
Out of Scope
The scope is limited to development of interfaces that expose inference capabilities of the modern platforms beneficial or purpose-built for ML. Training capabilities are out of scope due to limited availability of respective platform APIs.
This Working Group will not define any hardware features or algorithms.
To avoid overlap with existing work, alignment with the Basic Linear Algebra Subprograms (BLAS) interface is out of scope. The WebGPU shaders and WebAssembly SIMD are expected to address the BLAS compatibility requirement, see the Coordination section for details.
Integration between the WebNN and WebGL APIs is out of scope, as the group focuses its efforts on integration with WebGPU APIs.
Updated document status is available on the group publication status page.
The Working Group will deliver the following W3C normative specifications:
- Web Neural Network API
This specification defines an API to enable neural network inference that can take advantage of hardware acceleration.
Draft state: W3C Working Draft
Expected completion: Q1 2025
Adopted Draft: https://www.w3.org/TR/2023/WD-webnn-20230124/, 2023-01-24 (this will change before the AC review starts)
Exclusion Draft: https://www.w3.org/TR/2021/WD-webnn-20210622/, 2021-06-22
Exclusion period began 2021-06-22; Exclusion period ended 2021-11-19.
Exclusion Draft Charter: https://www.w3.org/2021/04/web-machine-learning-charter.html
Depending on the Community Group progress, this Working Group may deliver the following W3C normative specifications after sufficient incubation in the Community Group:
- Model Loader API
This specification defines an API to load a custom pre-trained machine learning model.
Draft state: Adopted from Web Machine Learning Community Group
Expected completion: [N/A]
Note: The Model Loader API needs a standard format supported across browsers and devices for broad interoperability. The Working Group will only create a standard format of its own if no other standardized format aligns with the group's principles nor allows the group to control or provide direct input to shape it. The Working Group will only start working on this API when there is agreement on such a format.
The Working Group develops Ethical Principles for Web Machine Learning Working Group Note documenting ethical issues associated with using Machine Learning on the Web, to help identify what mitigations its normative specifications should take into account.
Other non-normative documents may be created such as:
- Use case and requirement documents;
- Test suite and implementation report for the specification;
- Primer or Best Practice documents to support web developers when designing applications.
- Q2 2023: Candidate Recommendation for WebNN
- Q1 2025: Recommendation for WebNN
In order to advance to Proposed Recommendation, each normative specification is expected to have at least two independent, interoperable implementations of every feature defined in the specification, where interoperability can be verified by passing open test suites, and two or more implementations interoperating with each other. In order to advance to Proposed Recommendation, each normative specification must have an open test suite of every feature defined in the specification..
Each specification should contain a section detailing all known security and privacy implications for implementers, Web authors, and end users.
Each specification should contain a section detailing ethical considerations describing how implementers and Web authors should mitigate risks associated with ethical issues, such as the ones the group will be documenting.
There should be testing plans for each specification, starting from the earliest drafts. To promote interoperability, all changes made to specifications in Candidate Recommendation or to features that have deployed implementations should have tests. Testing efforts should be conducted via the Web Platform Tests project.
Each specification should contain a section on accessibility that describes the benefits and impacts, including ways specification features can be used to address them, and recommendations for maximising accessibility in implementations.
This Working Group expects to follow the TAG Web Platform Design Principles.
For all specifications, this Working Group will seek horizontal review for accessibility, internationalization, privacy, and security with the relevant Working and Interest Groups, and with the TAG. Invitation for review must be issued during each major standards-track document transition, including FPWD. The Working Group is encouraged to engage collaboratively with the horizontal review groups throughout development of each specification. The Working Group is advised to seek a review at least 3 months before first entering CR and is encouraged to proactively notify the horizontal review groups when major changes occur in a specification following a review.
Additional technical coordination with the following Groups will be made, per the W3C Process Document:
- Web Machine Learning Community Group
- The Web Machine Learning Community Group developed the Web Neural Network API adopted by this Working Group. It is expected that the Community Group will continue drive technical work around other specifications in its scope. This Working Group will work with the Web Machine Learning Community Group on shaping the Tentative Specifications being worked on in the Community Group for the Recommendation track.
- GPU for the Web Working Group
- The GPU for the Web Working Group defines access to GPU devices with the WebGPU API, and a WebGPU Shading Language that may be used to implement traditional machine learning algorithms efficiently. The Web Machine Learning Working Group will coordinate with this group to avoid overlap and to ensure proper integration of WebNN with WebGPU APIs.
- WebAssembly Community Group
- The WebAssembly Community Group incubates a proposal for a 128-bit SIMD support in WebAssembly that can be used to implement traditional machine learning algorithms efficiently. The Web Machine Learning Working Group will coordinate with this group to avoid overlap.
- WebRTC Working Group
The WebRTC Working Group defines the
MediaStreaminterface and related media processing APIs that enable integration with Machine Learning capabilities afforded by the WebNN API.
- Technical Architecture Group
- Given the well-known ethical risks of bias in the use of Machine Learning, the Web Machine Learning Working Group will work with the Technical Architecture Group to ensure its work align with the W3C TAG Ethical Web Principles.
- ECMA TC39
ArrayBuffer). Possible work on operator overloading would also impact possible evolutions of the WebNN API.
- OpenXLA Project
- OpenXLA Project develops StableHLO, a portable ML compute operation set that makes frameworks easier to deploy across different hardware. WebNN API targets diverse hardware platforms and defines an operation set whose high-level operations can be decomposed to low level primitives that can map to StableHLO operations. Coordination and alignment between these two operation sets is beneficial to the open ML ecosystem.
To be successful, this Working Group is expected to have 6 or more active participants for its duration, including representatives from the key implementors of this specification, and active Editors and Test Leads for each specification. The Chairs, specification Editors, and Test Leads are expected to contribute half of a working day per week towards the (Working|Interest) Group. There is no minimum requirement for other Participants.
The group encourages questions, comments and issues on its public mailing lists and document repositories, as described in Communication.
The group also welcomes non-Members to contribute technical submissions for consideration upon their agreement to the terms of the W3C Patent Policy.
Participants in the group are required (by the W3C Process) to follow the W3C Code of Ethics and Professional Conduct.
Technical discussions for this Working Group are conducted in public: the meeting minutes from teleconference and face-to-face meetings will be archived for public review, and technical discussions and issue tracking will be conducted in a manner that can be both read and written to by the general public. Working Drafts and Editor's Drafts of specifications will be developed in public repositories and may permit direct public contribution requests. The meetings themselves are not open to public participation, however.
Information about the group (including details about deliverables, issues, actions, status, participants, and meetings) will be available from the Web Machine Learning Working Group home page.
Most Web Machine Learning Working Group teleconferences will focus on discussion of particular specifications, and will be conducted on an as-needed basis.
This group primarily conducts its technical work on GitHub issues. The public is invited to review, discuss and contribute to this work.
The group may use a Member-confidential mailing list for administrative purposes and, at the discretion of the Chairs and members of the group, for member-only discussions in special cases when a participant requests such a discussion.
This group will seek to make decisions through consensus and due process, per the W3C Process Document (section 5.2.1, Consensus). Typically, an editor or other participant makes an initial proposal, which is then refined in discussion with members of the group and other reviewers, and consensus emerges with little formal voting being required.
However, if a decision is necessary for timely progress and consensus is not achieved after careful consideration of the range of views presented, the Chairs may call for a group vote and record a decision along with any objections.
To afford asynchronous decisions and organizational deliberation, any resolution (including publication decisions) taken in a face-to-face meeting or teleconference will be considered provisional. A call for consensus (CfC) will be issued for all resolutions (for example, via email, GitHub issue or web-based survey), with a response period from one week to 10 working days, depending on the chair's evaluation of the group consensus on the issue. If no objections are raised by the end of the response period, the resolution will be considered to have consensus as a resolution of the Working Group.
All decisions made by the group should be considered resolved unless and until new information becomes available or unless reopened at the discretion of the Chairs or the Director.
This charter is written in accordance with the W3C Process Document (Section 5.2.3, Deciding by Vote) and includes no voting procedures beyond what the Process Document requires.
This Working Group operates under the W3C Patent Policy (Version of 15 September 2020). To promote the widest adoption of Web standards, W3C seeks to issue Recommendations that can be implemented, according to this policy, on a Royalty-Free basis. For more information about disclosure obligations for this group, please see the licensing information.
This Working Group will use the W3C Software and Document license for all its deliverables.
About this Charter
This charter has been created according to section 3.4 of the Process Document. In the event of a conflict between this document or the provisions of any charter and the W3C Process, the W3C Process shall take precedence.
The following table lists details of all changes from the initial charter, per the W3C Process Document (section 4.3, Advisory Committee Review of a Charter):
|Charter Period||Start Date||End Date||Changes|
|Initial Charter||2021-04-20||2023-04-30||Initial charter|
Changes to this document are documented in this section.