Diversity in machine learning APIs works against realising machine learning's full potential by making it difficult to compose multiple algorithms. This paper introduces the Protocols and Structures for Inference (PSI) service architecture and specification for presenting learning algorithms and data as RESTful web resources that are accessible via a common but flexible and extensible interface. This is joint work with Dr. Mark Reid of the Australian National University and NICTA and Dr. Barry Drake of Canon Information Systems Research Australia.
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
[Research] protocols and structures for inference a res tful api for machine learning - James Montgomery
1. psikit.net
github.com/psi-project
Protocols and Structures for Inference
A RESTful API for Machine Learning
work conducted at ANU in collaboration with CISRA
and additional support from an Amazon AWS Education Grant
James Montgomery
james.montgomery@utas.edu.au
@jamesatbond
Mark Reid
mark.reid@anu.edu.au
@mdreid
Barry Drake
barry.drake@cisra.canon.com.au
http://...
http://...
http://...
2. psikit.net
github.com/psi-project An ‘ecosystem’ of ML services
Prediction API
Microsoft Azure
Machine Learning
Amazon Machine Learning
…and many others
The problem is not that these
are bad (they’re all very good)
nor that there is competition
(also good)
But this ecosystem doesn’t
encourage service
composition or provide a way
for ML practitioners of all
sizes to share their data and
algorithms
3. psikit.net
github.com/psi-project Goals of PSI
A web service API
• that is standardised, yet
• sufficiently flexible to support a wide range of ML techniques
Select your ML du jour
Flexible Federated
http://...
http://...
http://...
4. psikit.net
github.com/psi-project Protocols and Structures for Inference
An API specification for ML web services
Communication via JSON
Set of common ML-related resources that describe their
differences using a schema language (based on JSON schema)
Support for data transformation, training, prediction and
updating/online learning
with points for extension and customisation
and support for data formats beyond JSON
Iris Versicolor by Danielle Langlois / CC-BY-SA-3.0
10. psikit.net
github.com/psi-project Is it RESTful? Is that important?
100% RESTful is not a reasonable aim
But can improve interoperability and development of clients
• Discoverable namespace
• Extensible through links entry in resource representations
(similar to HTML link element & part of JSON Hyper-schema standard)
Client must still know it’s using a PSI service…
• but each resource does provide information
about how to use it through schema
(no PSI media types)
11. psikit.net
github.com/psi-project Schema describes…
@
Form of learning tasks that
learners can process
The domain and range of
transformers
f(x)
The domain and range
of transformers
Service-specific queries
supported by relations
The data format of attributes
14. psikit.net
github.com/psi-project Training
GET
representation
includes task
schema
resources
any other
vector attribute
training parameters
nominal attribute
@
@
@
POST
a task
resources
n = 5
a vector attribute
l = 0.5
a nominal attribute
JSON representations
of attributes (not
their values) or URI
references
discover attributes;
reshape as needed;
compose with transformers
201 Created/202 Accepted
URI of
1
2
3
4
15. psikit.net
github.com/psi-project What’s in the schema
Algorithm requires an
attribute that produces
JSON schema required to describe PSI attribute’s
representation and enforce it produces correct values
Feature vectors of
numbers
{"type":"object","properties":{"responseTy
pe":{"enum":["attribute#description"],"req
uired":true},"uri":{"type":"string","requi
red":true},"schema":{"type":"object","prop
erties":{"type":{"enum":["array"],"require
d":true},"items":{"type":"array","items":{
"type":"object","properties":{"type":{"enu
m":["integer","number"],"required":true}}}
,"required":true}},"required":true},"descr
iption":{"type":"string"},"provenance":{"t
ype":["string","object"]},"relation":{"typ
e":"string"},"subattributes":{"type":"arra
y","items":{"type":"string"}}}}
𝑋 ∈ 𝑛
This is really the only change,
but this is still very complicated
19. psikit.net
github.com/psi-project Beyond JSON data types
• PSI rich values support data of any media type
(PSI schema can still be used for data type validation)
• Rich value is either an HTTP URI or Data URI
Iris Versicolor by Danielle Langlois / CC-BY-SA-3.0
data:image/png;base64/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODww
20. psikit.net
github.com/psi-project Proofs of concept
Demonstration PSI service at poseidon.cecs.anu.edu.au
Demonstration Javascript client at
psi.cecs.anu.edu.au/demo
• HTML forms generated from PSI schema
• Predictor evaluation and comparison
Play 1.2-based service, that exposes some classification and
regression algorithms from
scikit-learn
plus a simple
ranking algorithm
using scikit-learn
An HTML to bag-of-words
transformer in Python will
be on GitHub soon
24. psikit.net
github.com/psi-project Future
Amazon AWS AMI
of play-based
service planned
thanks to an
Amazon AWS
Education Grant
PSI provides
the core of a
flexible ML
API that can
be freely
implemented
Security &
authentication can
be built on top
Can be offered as
alternative interface
to existing ML web
services