Deep Learning
Researchers use deep learning to 'denoise' nanopore data
Scientists from the Institute of Scientific and Industrial Research at Osaka University have used machine-learning methods to enhance the signal-to-noise ratio in data collected when tiny spheres are passed through microscopic nanopores cut into silicon substrates. This work may lead to much more sensitive data collection when sequencing DNA or detecting small concentrations of pathogens. Miniaturization has opened the possibility for a wide range of diagnostic tools, such as point-of-care detection of diseases, to be performed quickly and with very small samples. For example, unknown particles can be analyzed by passing them through nanopores and recording tiny changes in the electrical current. However, the intensity of these signals can be very low, and is often buried under random noise.
Predictive analytics made easier in the cloud
Generating valuable predictive analytics from your data assets is hard, as most teams working on and building these capabilities take the difficult route. Experimentation on, and the development of, these powerful predictive capabilities in the cloud makes life much easier and cheaper not to leverage. Many enterprises greatly lack the right skills to select the right tools before the job even begins. Early decisions play a massive part in the overall and sustainable success when it comes to building predictive capabilities. To create impactful and valuable predictive insights through machine learning and deep learning models, copious amounts of data and effective ways to clean all that data is required to perform feature engineering on it, which is a way to deploy your models and monitor them.
News - AI Manufacturing Solutions
NVMe, or Non-Volatile Memory Express, is a protocol released in 2011 for accessing high-speed storage systems media that came popular with the introduction of Solid-State Drives (SSDs). But what is NVMe and why is it important for machine learning and analytics applications? As businesses and systems continue to consume and process increasingly more data to support manufacturing, it is important to rethink how this data is captured, preserved, accessed and transformed. And because of the speed, NVMe is revolutionizing how the user configures deep learning systems for data storage, data access, and overall architecture when combined with other more traditional storage methods. This article will explain what NVMe is and share a deep technical dive into how the storage architecture works.
What is Focal Loss and when should you use it?
In this blogpost we will understand what Focal Loss and when is it used. We will also take a dive into the math and implement it in PyTorch. Where was Focal Loss introduced and what was it used for? So, why did that work? What did Focal Loss do to make it work? Alpha and Gamma? How to implement this in code? Credits Where was Focal Loss introduced and what was it used for? Before understanding what Focal Loss is and all the details about it, letโs first quickly get an intuitive understanding of what Focal Loss actually does. Focal loss was implemented in Focal Loss for Dense Object Detection paper by He et al. For years before this paper, Object Detection was actually considered a very difficult problem to solve and it was especially considered very hard to detect small size objects inside images. See example below where the model doesnโt predict anything for the motorbike which is of relatively smaller size compared to other images. The reason why in the image above, the bike is not predicted by the model is because this model was trained using Binary Cross Entropy loss which really asks the model to be confident about what is predicting. Whereasm, what Focal Loss does is that it makes it easier for the model to predict things without being 80-100% sure that this object is โsomethingโ. In simple words, giving the model a bit more freedom to take some risk when making predictions. This is particularly important when dealing with highly imbalanced datasets because in some cases (such as cancer detection), we really need to model to take a risk and predict something even if the prediction turns out to be a False Positive. Therefore, Focal Loss is particularly useful in cases where there is a class imbalance. Another example, is in the case of Object Detection when most pixels are usually background and only very few pixels inside an image sometimes have the object of interest. OK - so focal loss was introduced in 2017, and is pretty helpful in dealing with class imbalance - great! By the way, here are the predictions of the same model when trained with Focal Loss. This might be a good time to actually analyse the two and observe the differences. This will help get an intuitive understanding about Focal Loss. So, why did that work? What did Focal Loss do to make it work? So now that we have seen an example of what Focal Loss can do, letโs try and understand why that worked. The most important bit to understand about Focal Loss is the graph below: In the graph above, the โblueโ line represents the Cross Entropy Loss. The X-axis or โprobability of ground truth classโ (letโs call it pt for simplicity) is the probability that the model predicts for the ground truth object. As an example, letโs say the model predicts that something is a bike with probability 0.6 and it actually is a bike. The in this case pt is 0.6. Also, consider the same example but this time the object is not a bike. Then pt is 0.4 because ground truth here is 0 and probability that the object is not a bike is 0.4 (1-0.6). The Y-axis is simply the loss value given pt. As can be seen from the image, when the model predicts the ground truth with a probability of 0.6, the Cross Entropy Loss is still somewhere around 0.5. Therefore, to reduce the loss, our model would have to predict the ground truth label with a much higher probability. In other words, Cross Entropy Loss asks the model to be very confident about the ground truth prediction. This in turn can actually impact the performance negatively: The Deep Learning model can actually become overconfident and therefore, the model wouldnโt generalize well. This problem of overconfidence is also highlighted in this excellent paper Beyond temperature scaling: Obtaining well-calibrated multiclass probabilities with Dirichlet calibration. Also, Label Smoothing which was introduced as part of Rethinking the Inception Architecture for Computer Vision is another way to deal with the problem. Focal Loss is different from the above mentioned solutions. As can be seen from the graph Compare FL with CE, using Focal Loss with ฮณ>1 reduces the loss for โwell-classified examplesโ or examples when the model predicts the right thing with probability > 0.5 whereas, it increases loss for โhard-to-classify examplesโ when the model predicts with probability < 0.5. Therefore, it turns the models attention towards the rare class in case of class imbalance. The Focal Loss is mathematically defined as: Scary? Itโs rather quite intuitive - read on :) Alpha and Gamma? So, what the hell are these alpha and gamma in Focal Loss? Also, we will now represent alpha as ฮฑ and gamma as ฮณ. Here is my understanding from fig-3: ฮณ controls the shape of the curve. The higher the value of ฮณ, the lower the loss for well-classified examples, so we could turn the attention of the model more towards โhard-to-classify examples. Having higher ฮณ extends the range in which an example receives low loss. Also, when ฮณ=0, this equation is equivalent to Cross Entropy Loss. How? Well, for the mathematically inclined, Cross Entropy Loss is defined as: After some refactoring and defining pt as below: Putting eq-3 in eq-2, our Cross Entropy Loss therefore, becomes: Therefore, at ฮณ=0, eq-1 becomes equivalent to eq-4 that is Focal Loss becomes equivalent to Cross Entropy Loss. Here is an excellent blogpost that explains Cross Entropy Loss. Ok, great! So now we know what ฮณ does, but, what does ฮฑ do? Another way, apart from Focal Loss, to deal with class imbalance is to introduce weights. Give high weights to the rare class and small weights to the dominating or common class. These weights are referred to as ฮฑ. Adding these weights does help with class imbalance however, the focal loss paper reports: The large class imbalance encountered during training of dense detectors overwhelms the cross entropy loss. Easily classified negatives comprise the majority of the loss and dominate the gradient. While ฮฑ balances the importance of positive/negative examples, it does not differentiate between easy/hard examples. What the authors are trying to explain is this: Even when we add ฮฑ, while it does add different weights to different classes, thereby balancing the importance of positive/negative examples - just doing this in most cases is not enough. What we also want to do is to reduce the loss of easily-classified examples because otherwise these easily-classified examples would dominate our training. So, how does Focal Loss deal with this? It adds a multiplicative factor to Cross Entropy loss and this multiplicative factor is (1 โ pt)**ฮณ where pt as you remember is the probability of the ground truth label. From the paper for Focal Loss: We propose to add a modulating factor (1 โ pt)**ฮณ to the cross entropy loss, with tunable focusing parameter ฮณ โฅ 0. Really? Is that all that the authors have done? That is to add (1 โ pt)**ฮณ to Cross Entropy Loss? Yes!! Remember eq-4? How to implement this in code? While TensorFlow provides this loss function here, this is not inherently supported by PyTorch so we have to write a custom loss function. Here is the implementation of Focal Loss in PyTorch: class WeightedFocalLoss(nn.Module): "Non weighted version of Focal Loss" def __init__(self, alpha=.25, gamma=2): super(WeightedFocalLoss, self).__init__() self.alpha = torch.tensor([alpha, 1-alpha]).cuda() self.gamma = gamma def forward(self, inputs, targets): BCE_loss = F.binary_cross_entropy_with_logits(inputs, targets, reduction='none') targets = targets.type(torch.long) at = self.alpha.gather(0, targets.data.view(-1)) pt = torch.exp(-BCE_loss) F_loss = at*(1-pt)**self.gamma * BCE_loss return F_loss.mean() If youโve understood the meaning of alpha and gamma then this implementation should also make sense. Because, similar to the paper it is simply adding a factor of at*(1-pt)**self.gamma to the BCE_loss or Binary Cross Entropy Loss. Credits Please feel free to let me know via twitter if you did end up trying Focal Loss after reading this and whether you did see an improvement in your results! Thanks for reading! The implementation of Focal Loss has been adapted from here. fig-1 and fig-2 are from the Fastai 2018 course Lecture-09!
Physics-informed attention-based neural network for solving non-linear partial differential equations
Rodriguez-Torrado, Ruben, Ruiz, Pablo, Cueto-Felgueroso, Luis, Green, Michael Cerny, Friesen, Tyler, Matringe, Sebastien, Togelius, Julian
Physics-Informed Neural Networks (PINNs) have enabled significant improvements in modelling physical processes described by partial differential equations (PDEs). PINNs are based on simple architectures, and learn the behavior of complex physical systems by optimizing the network parameters to minimize the residual of the underlying PDE. Current network architectures share some of the limitations of classical numerical discretization schemes when applied to non-linear differential equations in continuum mechanics. A paradigmatic example is the solution of hyperbolic conservation laws that develop highly localized nonlinear shock waves. Learning solutions of PDEs with dominant hyperbolic character is a challenge for current PINN approaches, which rely, like most grid-based numerical schemes, on adding artificial dissipation. Here, we address the fundamental question of which network architectures are best suited to learn the complex behavior of non-linear PDEs. We focus on network architecture rather than on residual regularization. Our new methodology, called Physics-Informed Attention-based Neural Networks, (PIANNs), is a combination of recurrent neural networks and attention mechanisms. The attention mechanism adapts the behavior of the deep neural network to the non-linear features of the solution, and break the current limitations of PINNs. We find that PIANNs effectively capture the shock front in a hyperbolic model problem, and are capable of providing high-quality solutions inside and beyond the training set.
Data Assimilation Predictive GAN (DA-PredGAN): applied to determine the spread of COVID-19
Silva, Vinicius L S, Heaney, Claire E, Li, Yaqi, Pain, Christopher C
We propose the novel use of a generative adversarial network (GAN) (i) to make predictions in time (PredGAN) and (ii) to assimilate measurements (DA-PredGAN). In the latter case, we take advantage of the natural adjoint-like properties of generative models and the ability to simulate forwards and backwards in time. GANs have received much attention recently, after achieving excellent results for their generation of realistic-looking images. We wish to explore how this property translates to new applications in computational modelling and to exploit the adjoint-like properties for efficient data assimilation. To predict the spread of COVID-19 in an idealised town, we apply these methods to a compartmental model in epidemiology that is able to model space and time variations. To do this, the GAN is set within a reduced-order model (ROM), which uses a low-dimensional space for the spatial distribution of the simulation states. Then the GAN learns the evolution of the low-dimensional states over time. The results show that the proposed methods can accurately predict the evolution of the high-fidelity numerical simulation, and can efficiently assimilate observed data and determine the corresponding model parameters.
SpikE: spike-based embeddings for multi-relational graph data
Dold, Dominik, Garrido, Josep Soler
Despite the recent success of reconciling spike-based coding with the error backpropagation algorithm, spiking neural networks are still mostly applied to tasks stemming from sensory processing, operating on traditional data structures like visual or auditory data. A rich data representation that finds wide application in industry and research is the so-called knowledge graph - a graph-based structure where entities are depicted as nodes and relations between them as edges. Complex systems like molecules, social networks and industrial factory systems can be described using the common language of knowledge graphs, allowing the usage of graph embedding algorithms to make context-aware predictions in these information-packed environments. We propose a spike-based algorithm where nodes in a graph are represented by single spike times of neuron populations and relations as spike time differences between populations. Learning such spike-based embeddings only requires knowledge about spike times and spike time differences, compatible with recently proposed frameworks for training spiking neural networks. The presented model is easily mapped to current neuromorphic hardware systems and thereby moves inference on knowledge graphs into a domain where these architectures thrive, unlocking a promising industrial application area for this technology.
EasyFL: A Low-code Federated Learning Platform For Dummies
Zhuang, Weiming, Gan, Xin, Wen, Yonggang, Zhang, Shuai
Academia and industry have developed several platforms to support the popular privacy-preserving distributed learning method -- Federated Learning (FL). However, these platforms are complex to use and require a deep understanding of FL, which imposes high barriers to entry for beginners, limits the productivity of data scientists, and compromises deployment efficiency. In this paper, we propose the first low-code FL platform, EasyFL, to enable users with various levels of expertise to experiment and prototype FL applications with little coding. We achieve this goal while ensuring great flexibility for customization by unifying simple API design, modular design, and granular training flow abstraction. With only a few lines of code, EasyFL empowers them with many out-of-the-box functionalities to accelerate experimentation and deployment. These practical functionalities are heterogeneity simulation, distributed training optimization, comprehensive tracking, and seamless deployment. They are proposed based on challenges identified in the proposed FL life cycle. Our implementations show that EasyFL requires only three lines of code to build a vanilla FL application, at least 10x lesser than other platforms. Besides, our evaluations demonstrate that EasyFL expedites training by 1.5x. It also improves the efficiency of experiments and deployment. We believe that EasyFL will increase the productivity of data scientists and democratize FL to wider audiences.
VPN++: Rethinking Video-Pose embeddings for understanding Activities of Daily Living
Das, Srijan, Dai, Rui, Yang, Di, Bremond, Francois
Abstract--Many attempts have been made towards combining RGB and 3D poses for the recognition of Activities of Daily Living (ADL). ADL may look very similar and often necessitate to model fine-grained details to distinguish them. Because the recent 3D ConvNets are too rigid to capture the subtle visual patterns across an action, this research direction is dominated by methods combining RGB and 3D Poses. But the cost of computing 3D poses from RGB stream is high in the absence of appropriate sensors. This limits the usage of aforementioned approaches in real-world applications requiring low latency. Then, how to best take advantage of 3D Poses for recognizing ADL? To this end, we propose an extension of a pose driven attention mechanism: Video-Pose Network (VPN), exploring two distinct directions. One is to transfer the Pose knowledge into RGB through a feature-level distillation and the other towards mimicking pose driven attention through an attention-level distillation. Finally, these two approaches are integrated into a single model, we call VPN . We show that VPN is not only effective but also provides a high speed up and high resilience to noisy Poses. VPN, with or without 3D Poses, outperforms the representative baselines on 4 public datasets.
Compressed Communication for Distributed Training: Adaptive Methods and System
Zhong, Yuchen, Xie, Cong, Zheng, Shuai, Lin, Haibin
Communication overhead severely hinders the scalability of distributed machine learning systems. Recently, there has been a growing interest in using gradient compression to reduce the communication overhead of the distributed training. However, there is little understanding of applying gradient compression to adaptive gradient methods. Moreover, its performance benefits are often limited by the non-negligible compression overhead. In this paper, we first introduce a novel adaptive gradient method with gradient compression. We show that the proposed method has a convergence rate of $\mathcal{O}(1/\sqrt{T})$ for non-convex problems. In addition, we develop a scalable system called BytePS-Compress for two-way compression, where the gradients are compressed in both directions between workers and parameter servers. BytePS-Compress pipelines the compression and decompression on CPUs and achieves a high degree of parallelism. Empirical evaluations show that we improve the training time of ResNet50, VGG16, and BERT-base by 5.0%, 58.1%, 23.3%, respectively, without any accuracy loss with 25 Gb/s networking. Furthermore, for training the BERT models, we achieve a compression rate of 333x compared to the mixed-precision training.