Slide 1

Slide 1 text

Architectural Patterns in Machine Learning Nishan Subedi VP, Algorithms @ Overstock, Inc.

Slide 2

Slide 2 text

Overstock.com

Slide 3

Slide 3 text

What is a Pattern? Relationships between components which resolves a small system of interacting and conflicting forces, and is independent of all other forces in all possible contexts. - Components can be created independently. - Components can then be combined together. - Design is an error correcting process. - Good design is characterized by absence of misfits (painful to do something). Many subsets of forces work together to build a pattern.

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Driven by the Scientific Methodology (OODA Loop)

Slide 7

Slide 7 text

Scientific Methodology (OODA Loop) applied to the ML Product life cycle

Slide 8

Slide 8 text

Decide Every action starts with a decision

Slide 9

Slide 9 text

Experimentation requires flexibility to test new ● Model architectures ● Featurization & data aggregations ● Optimization functions ● Training data sampling ● Evaluation metrics

Slide 10

Slide 10 text

Changing environment as we Act on what we Decide

Slide 11

Slide 11 text

Abstraction allows preserving context across changing environments https://www.tecton.ai/blog/what-is-a-feature-store/

Slide 12

Slide 12 text

Production Forces: ● Latency ● Availability ● Consistency ● Operability

Slide 13

Slide 13 text

Consistent model deployment abstraction https://www.tensorflow.org/tfx/serving/architecture

Slide 14

Slide 14 text

Observe

Slide 15

Slide 15 text

Forces at play during observation ● A/B testing ● Data drift ● Hidden feedback loops ● Feature erosion ● Consistency of features across batch / real time contexts ● Bias ● Offline / online metric comparison

Slide 16

Slide 16 text

Forms that facilitate Observation - Variant

Slide 17

Slide 17 text

Designing for Observability

Slide 18

Slide 18 text

Value = timely response to changing needs aka faster iterations through the OODA loop “Whoever can handle the quickest rate of change is the one who survives.” ― John Boyd

Slide 19

Slide 19 text

Architect for ease of iteration on the OODA loop Encode good practices into the architecture, make observability a default.

Slide 20

Slide 20 text

Reusability

Slide 21

Slide 21 text

Pattern Language Each pattern forms a word or thought of a language rather than a prescriptive way to design or solve a problem. This language allows precise conversations in teams, organizations and the industry. Architecture allows you to transcend a specific context to communicate with others within similar forces.

Slide 22

Slide 22 text

Organizational patterns No pattern is an isolated entity. Each pattern can exist in the world, only to the extent that it is supported by other patterns: the larger patterns in which it is embedded. You and what your architecture is part of your organization.

Slide 23

Slide 23 text

Organizational patterns An organization is made of the conversations between its people - actions emerge from these. An organization’s ability to create language is synonymous with its ability to evolve.

Slide 24

Slide 24 text

Organizational patterns Having an architecture gives you a language allows you to get faster iterations of your OODA loop since it allows to much more effectively shine light on the right aspects that you need to talk about.

Slide 25

Slide 25 text

How to speed up your OODA loop? 1. Consistent architecture 2. Encapsulation of higher order information through data refinery 3. Flexibility in optimization well integrated with productionization process 4. Variant identification and propagation through various stages 5. Codify life cycle of ML in the language & process of the company

Slide 26

Slide 26 text

Thankyou! We are hiring: overstock.com/careers