Skip to content

Web Neural Network API 2025-03-20 > 2025-06-20 #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
anssiko opened this issue Mar 20, 2025 · 2 comments
Open

Web Neural Network API 2025-03-20 > 2025-06-20 #156

anssiko opened this issue Mar 20, 2025 · 2 comments
Assignees
Labels
CR In Candidate Recommendation pending This issue needs to get a reviewer assigned to it REVIEW REQUESTED

Comments

@anssiko
Copy link

anssiko commented Mar 20, 2025

Other comments:

This API has received privacy review in 2021, 2022 and 2024. The following are the key changes that the group believes are of interest to privacy reviewers since the previous review took place:

New API to identify feature support per operator. The opSupportLimits() method allows developers to probe feature support per operator so that the optimal model architecture can be chosen ahead of time. With this information, the compatible model weights can be downloaded on the first attempt without costly trial and error (weights are typically large). The information exposed by this API roughly corresponds to the underlying operating system and/or browser version, thus the group believe this feature does not add to the entropy significantly.

Removal of the device type preference. The device type indicated the application’s preference for the kind of device used for the compute: "cpu", "gpu", or "npu". This device type abstraction represented by MLDeviceType was removed (see Device Selection Explainer) to mitigate the issue reported in the earlier privacy review:

Re: "If a future version of this specification introduces support for new a device type that can only support a subset of MLOperandTypes, that may introduce a new fingerprint", what mitigations does the WG envisage should this occur?

@anssiko anssiko added CR In Candidate Recommendation pending This issue needs to get a reviewer assigned to it REVIEW REQUESTED labels Mar 20, 2025
@sandandsnow
Copy link
Collaborator

@anssiko, re: New API to identify feature support per operator, does this only provide information about what the browser provides? When you say "roughly corresponds" what do you mean?

@anssiko
Copy link
Author

anssiko commented Apr 17, 2025

re: New API to identify feature support per operator, does this only provide information about what the browser provides?

Correct. You can think of the WebNN API as an abstraction layer on top of the major ML APIs (that ship with the OS) and libraries (that ship as part of the browser). The WebNN API does not provide any information about the underlying ML APIs or libraries.

When you say "roughly corresponds" what do you mean?

Given the above, the feature support per operator can be inferred from the OS and browser version. We believe the explicit method is a more convenient way for web developers to understand feature support than OS and browser feature detection. This design also provides an extension point for privacy controls should such a need arise in the future, e.g. if the ecosystem would diversify significantly from its current state.

Thank you for your review feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CR In Candidate Recommendation pending This issue needs to get a reviewer assigned to it REVIEW REQUESTED
Projects
None yet
Development

No branches or pull requests

2 participants