Perceptrons
Two Steps Forward, Two Steps Back
In this post, I'll start with a high-level review of what we've learned so far with neural networks and how they work up through a complete forward pass, and then conceptually walk through the back propagation technique to use gradient descent and adjust the randomized weight and bias values to align predictions more closely to actual labels. We will uncover some really neat math effects of using the ReLU activation function, and find out how the chain rule is applied to make finding the gradients across all of the layers a relatively low-effort process from a compute standpoint. This one is a little heavier than my normal post, by necessity, so brace yourselves! That said, hopefully this will help you understand how one of the more complicated concepts in machine learning today works in real-world applications. It starts with the Perceptron, which was the first machine learning algorithm developed and can be used to create a function that separated two classes, assuming a hyperplane exists that can do so.
Robustness Verification for Attention Networks using Mixed Integer Programming
Liao, Hsuan-Cheng, Cheng, Chih-Hong, Kneissl, Maximilian, Knoll, Alois
Attention networks such as transformers have been shown powerful in many applications ranging from natural language processing to object recognition. This paper further considers their robustness properties from both theoretical and empirical perspectives. Theoretically, we formulate a variant of attention networks containing linearized layer normalization and sparsemax activation, and reduce its robustness verification to a Mixed Integer Programming problem. Apart from a na\"ive encoding, we derive tight intervals from admissible perturbation regions and examine several heuristics to speed up the verification process. More specifically, we find a novel bounding technique for sparsemax activation, which is also applicable to softmax activation in general neural networks. Empirically, we evaluate our proposed techniques with a case study on lane departure warning and demonstrate a performance gain of approximately an order of magnitude. Furthermore, although attention networks typically deliver higher accuracy than general neural networks, contrasting its robustness against a similar-sized multi-layer perceptron surprisingly shows that they are not necessarily more robust.
gMLP: Winning over Transformers?
Alright, we all know that transformers are cool. At least in terms of NLP, these architectures are considered to be state-of-the-art (SOTA) for language modelling, and help us perform beautifully on various downtream tasks, such as named-entity-recognition (NER), question answering (QA), part of speech tagging (POS) etc. But in this tutorial, we will dive into another architecture called Gated Multilayer Perceptron (gMLP), proposed by Google Research team. As I mentioned above, transformer architectures are very powerful, and if you want to achieve a really high performance in your particular task, you should consider using some pre-trained transformers. You could usually find them on Huggingface.
Refactoring a Machine Learning Model
This blog post is a tutorial that will take you from a naive implementation of a multilayer perceptron in PyTorch to an enlightened implementation that simultaneously leverages the power of PyTorch, Python's builtins, and some powerful third party Python packages. This tutorial isn't really about the theory nor application of machine learning models - it's just about the best ways to implement them. I'm also going to commit the sin of omitting docstrings and a lot of type annotations, since most of the MLP should be pretty obvious. Let's start with a naive implementation, that reflects some old habits from C or Java programming: MLP1 uses the dreaded range(len(...)) pattern, which can almost always be replaced with direct iteration. However, in this case, it uses the index to get the next element with it.
SFMGNet: A Physics-based Neural Network To Predict Pedestrian Trajectories
Hossain, Sakif, Johora, Fatema T., Mรผller, Jรถrg P., Hartmann, Sven, Reinhardt, Andreas
Autonomous robots and vehicles are expected to soon become an integral part of our environment. Unsatisfactory issues regarding interaction with existing road users, performance in mixed-traffic areas and lack of interpretable behavior remain key obstacles. To address these, we present a physics-based neural network, based on a hybrid approach combining a social force model extended by group force (SFMG) with Multi-Layer Perceptron (MLP) to predict pedestrian trajectories considering its interaction with static obstacles, other pedestrians and pedestrian groups. We quantitatively and qualitatively evaluate the model with respect to realistic prediction, prediction performance and prediction "interpretability". Initial results suggest, the model even when solely trained on a synthetic dataset, can predict realistic and interpretable trajectories with better than state-of-the-art accuracy.
Projection-based Point Convolution for Efficient Point Cloud Segmentation
Ahn, Pyunghwan, Yang, Juyoung, Yi, Eojindl, Lee, Chanho, Kim, Junmo
Understanding point cloud has recently gained huge interests following the development of 3D scanning devices and the accumulation of large-scale 3D data. Most point cloud processing algorithms can be classified as either point-based or voxel-based methods, both of which have severe limitations in processing time or memory, or both. To overcome these limitations, we propose Projection-based Point Convolution (PPConv), a point convolutional module that uses 2D convolutions and multi-layer perceptrons (MLPs) as its components. In PPConv, point features are processed through two branches: point branch and projection branch. Point branch consists of MLPs, while projection branch transforms point features into a 2D feature map and then apply 2D convolutions. As PPConv does not use point-based or voxel-based convolutions, it has advantages in fast point cloud processing. When combined with a learnable projection and effective feature fusion strategy, PPConv achieves superior efficiency compared to state-of-the-art methods, even with a simple architecture based on PointNet++. We demonstrate the efficiency of PPConv in terms of the trade-off between inference time and segmentation performance. The experimental results on S3DIS and ShapeNetPart show that PPConv is the most efficient method among the compared ones. The code is available at github.com/pahn04/PPConv.
An ASP approach for reasoning on neural networks under a finitely many-valued semantics for weighted conditional knowledge bases
Giordano, Laura, Duprรฉ, Daniele Theseider
Weighted knowledge bases for description logics with typicality have been recently considered under a "concept-wise" multipreference semantics (in both the two-valued and fuzzy case), as the basis of a logical semantics of MultiLayer Perceptrons (MLPs). In this paper we consider weighted conditional ALC knowledge bases with typicality in the finitely many-valued case, through three different semantic constructions, based on coherent, faithful and phi-coherent interpretations. For the boolean fragment LC of ALC we exploit ASP and "asprin" for reasoning with the concept-wise multipreference entailment under a phi-coherent semantics, suitable to characterize the stationary states of MLPs. As a proof of concept, we experiment the proposed approach for checking properties of trained MLPs.
Real-Time Facial Expression Recognition using Facial Landmarks and Neural Networks
Haghpanah, Mohammad Amin, Saeedizade, Ehsan, Masouleh, Mehdi Tale, Kalhor, Ahmad
This paper presents a lightweight algorithm for feature extraction, classification of seven different emotions, and facial expression recognition in a real-time manner based on static images of the human face. In this regard, a Multi-Layer Perceptron (MLP) neural network is trained based on the foregoing algorithm. In order to classify human faces, first, some pre-processing is applied to the input image, which can localize and cut out faces from it. In the next step, a facial landmark detection library is used, which can detect the landmarks of each face. Then, the human face is split into upper and lower faces, which enables the extraction of the desired features from each part. In the proposed model, both geometric and texture-based feature types are taken into account. After the feature extraction phase, a normalized vector of features is created. A 3-layer MLP is trained using these feature vectors, leading to 96% accuracy on the test set.
Kernel Methods and Multi-layer Perceptrons Learn Linear Models in High Dimensions
Sahraee-Ardakan, Mojtaba, Emami, Melikasadat, Pandit, Parthe, Rangan, Sundeep, Fletcher, Alyson K.
Empirical observation of high dimensional phenomena, such as the double descent behaviour, has attracted a lot of interest in understanding classical techniques such as kernel methods, and their implications to explain generalization properties of neural networks. Many recent works analyze such models in a certain high-dimensional regime where the covariates are independent and the number of samples and the number of covariates grow at a fixed ratio (i.e. proportional asymptotics). In this work we show that for a large class of kernels, including the neural tangent kernel of fully connected networks, kernel methods can only perform as well as linear models in this regime. More surprisingly, when the data is generated by a kernel model where the relationship between input and the response could be very nonlinear, we show that linear models are in fact optimal, i.e. linear models achieve the minimum risk among all models, linear or nonlinear. These results suggest that more complex models for the data other than independent features are needed for high-dimensional analysis.
Perceptrons:
It is a neural network unit(artificial) that does computations to detect certain features in input data. A perceptron can also be defined as an algorithm used for supervised learning of binary classifiers( decide whether an input belongs to a specific class). In 1943 McCullock and Pitts described a simple brain cell as a logic gate with binary inputs. In 1957 Frank Rosenblatt had an idea that Artificial neurons can stimulate brain principles, which led him to inventing the term PERCEPTRON. The output of a perceptron can only be binary (0 or 1).