Convolutional Neural Network
IntroductoryWhere’s Waldo GameBy holding a profile of a person (kernel), align the profile image and scan it line by line. At each position, compare the image against the position in the picture (find out the similarity), which is checking the correlation between the input profile against the position.
Translation invariance: We want to capture the pitch information
Locality: We want to focus on the local regions first and don’t care about the meaning at the beginning. Aggregate them later on t ...
Overfitting
Overfitting
Loss function curve
In machine learning, overfitting means the method is more complex than the problem, such that it can perform well on the training dataset but does not perform well on the testing dataset
The model is too complicated that it may fit the noise in the data
SolutionsData
Reason: The samples of data is too small, which do not reflect the true distribution
Solutions: Data Augmentation Noise misleads the model to learn a wrong distribution, but no noise can be t ...
Neural Network
Neural Network
Fully-connected layers
A general function approximator
We can approximate any function (relation) if we have enough nodes and layers
Feature extraction
Extract new features by linear or non-linear combination of the original features
New features may not have physical interpretation/meaning (usually for non-linear)
Activate Function
Hidden layers ReLU function is widely used for hidden layers by default
Output layers It depends on the task
Regression: Sigmoid function
...
Logistic Regression
Logistic RegressionWhen Logistic Regression works as a Neural Network,
Y^{\text{output}} = \begin{cases}
1, & \text{if } f(H, W) \geq 0.5 \\
0, & \text{otherwise}
\end{cases} \quad \text{where }f(H, W) = \frac{1}{1 + e^{-(w_h \cdot H + w_w \cdot W + w_0 \cdot 1)}}
Training: Fit the training data by getting the parameter $w_h$, $w_w$ and $w_0$
Test: Run the trained formula from the inputs
Loss FunctionLoss function is the function that we would like to minimize, it should be as small ...
Tail Tolerance
VariabilityVariability of response time leads to high tail latency
Parallelization is often used to reduce latency, but also amplifies variability
Scenario: A request is broken into sub-operations that are issued to multiple servers in parallel
These sub-operations must all complete (Let Pr(latency > 1s) = 0.01)
Sub-operations of a request issued to 100 servers Pr(request > 1s) = 1 – (1 – 0.01)100 = 0.63
Reducing Variability
Reducing head-of-line blocking
HOL blocking: blocked by lar ...
Zookeeper
Overview
Zookeeper is a highly-available, high-performance coordination service:
Key features: scalable, distributed, configuration, consensus, group membership, leader election, naming
It basically keeps track of information that must be synchronized across your cluster
Which node is the master?
What tasks are assigned to which workers?
Which workers are currently available?
It’s a tool that applications can use to recover from partial failures in your cluster
Zookeeper Guarantees
Clien ...
Facebook Photo Storage
Photo SearchFor each photo, four versions (called images) are stored and they are: large, medium, small, and thumbnail
Challenges: Looking up a single file from a huge set of files
Design Goals
High throughput and latency: Minimize disk I/Os
Fault tolerant: Replicate photos in geographically distinct locations
Cost effective: Cost per terabyte of usage must be kept low
Simple: Straightforward to implement and maintain
Typical Design
CDN (content delivery network): is a network of nodes th ...
Duplication
Cloud Storage
Cost Model
Commercial cloud storage providers charge by three components:
Storage space
Number of requests (e.g., PUT, GET, LIST, DELETE)
Data transfer (outbound from the cloud)
Tiered pricing model:
e.g., Amazon S3 cost for 50TB per month = 1024GB * \$0.0300 per GB + 49 * 1024GB * \$0.0295 per GB (cheaper)
Motivation of Dedeplication (Dropbox)Before 2016, Dropbox used AWS to store the data, but the charges of Dropbox are even cheaper than that of AWS, so how does Drop ...
Key-Value Stores
Storage Systems
Goal: understand how to manage big data in a systematic way
Motivation: how to provide real-time read/write random-access to big data?
Data is organized in terms of many “records” and it us unlikely to fit on single machine (distributed)
MapReduce is designed for batch processing rather than real-time access
Database-like systems are needed to access data efficiently
Commercial Relational Database Management Systems (RDBMS)
We don’t use the traditional relational-based datab ...




