Ausnahme gefangen: SSL certificate problem: certificate is not yet valid ๐Ÿ“Œ Introduction to TFLite On-device Recommendation

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š Introduction to TFLite On-device Recommendation


๐Ÿ’ก Newskategorie: AI Videos
๐Ÿ”— Quelle: blog.tensorflow.org

Posted by Ellie Zhou, Tian Lin, Cong Li, Shuangfeng Li and Sushant Prakash

Introduction & Motivation

We are excited to open source an end-to-end solution for TFLite on-device recommendation tasks. We invite developers to build on-device models using our solution that provides personalized, low-latency and high-quality recommendations, while preserving usersโ€™ privacy.

Generating personalized high-quality recommendations is crucial to many real-world applications, such as music, videos, merchandise, apps, news, etc. Currently, a typical recommender system is fully constructed at the server side, including collecting user activity logs, training recommendation models using the collected logs, and serving recommendation models.

While purely server-based recommender systems have been proven to be powerful, we explore and showcase a more lightweight approach to serve an recommendation model by deploying it on device. We demonstrate that such an on-device recommendation solution enjoys low latency inference that is orders of magnitude faster than server-side models. It enables user experiences that cannot be achieved by traditional server-based recommender systems, such as updating rankings and UI responding to every user tap or interaction.

Moreover, on-device model inference respects user privacy without sending user data to a server to do predictions, instead keeping all needed data on the device. It is possible to train the model on public data or via an existing proxy dataset to avoid collecting user data for each new use case, which is demonstrated in our solution. For on-device training, we would refer interested readers to Federated Learning or TFLite model personalization as an alternative.

Please find our solution includes the following components:
  • Source code that constructs and trains high quality personalized recommendation models for on-device scenarios.
  • A movie recommendation demo app that runs the model on device.
  • We also provided source code for preparing training examples and a pretrained model in Github repo.

Model

Recommendation problems are typically formulated as future-activity prediction problems. A recommendation model is therefore trained to predict the userโ€™s future activities, given their previous activities happened before. Our published model is constructed with the following architecture: At the context side, each user activity, such as a movie watch, is embedded into an embedding vector. Embedding vectors from past user activities are aggregated by the encoder to generate the context embedding. We support three different types of encoders:
  • Bag-of-Words: activity embeddings are simply averaged.
  • CNN: 1-D convolution is applied to activity embeddings followed by max-pooling.
  • RNN: LSTM is applied to activity embeddings.
At the label side, the label item, such as the next movie that the user watched or is interested in, is considered as โ€œpositiveโ€, while all other items (e.g. all other movies the user didnโ€™t watch) are considered as โ€œnegativeโ€ through negative sampling. Both positive and negative items are embedded, and the dot product combines the context embedding to produce logits and feed to the loss of softmax cross entropy. Other modeling situations where labels are not binary will be supported in future. After training, the model can be exported and deployed on device for serving. We take the top-K recommendations which are simply the K-highest logits between the context embedding and all label embeddings.

Example

To demonstrate the quality and the user experience of an on-device recommendation model, we trained an example movie recommendation model using the MovieLens dataset and developed a demo app. (Both the model and the app are for demonstration purposes only.) The MovieLens 1M dataset contains ratings from 6039 users across 3951 movies, with each user rating only a small subset of movies. For simplification, we ignore the rating score, and train a model to predict which movies will get rated given N previous movies, where N is referred to as the history length.
The modelโ€™s performance on all the three encoders with different history lengths is shown below: We can find that all models achieve high recall metric, while CNN and RNN models usually perform better for a longer history length. In practice, developers may conduct experiments with different history lengths and encoder types, and find out the best for the specific recommendation problem they want to solve.
We want to highlight that all the published on-device models have very low inference latency. For example, for the CNN model with N=10 which we integrated with our demo app, the inference latency on Pixel 4 phones is only 0.05ms in our experiment. As stated in the introduction, such a low latency allows developing immediate and smooth response to every user interaction on the phone, as is demonstrated in our app:

Future Work

We welcome different kinds of extensions and contributions. The currently open sourced model does not support more than one feature column to represent each userโ€™s activity. In the next version, we are going to support multiple features as the activity representation. Moreover, we are planning more advanced user encoders, such as Transformer-based (Vaswani, A., et al., 2017).

References

Vaswani, A., et al. "Attention is all you need. arXiv 2017." arXiv preprint arXiv:1706.03762 (2017), https://arxiv.org/abs/1706.03762.

...



๐Ÿ“Œ Now, why should we care about Recommendation Systemsโ€ฆ? ft. A soft introduction to Thompson Sampling


๐Ÿ“ˆ 27.16 Punkte

๐Ÿ“Œ Accelerate models with TFLite Delegates (TF Dev Summit '20)


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Optimizing style transfer to run on mobile with TFLite


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ TensorFlow up to 1.15.3/2.0.2/2.1.1/2.2.0/2.3.0 TFLite Model input validation


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ TensorFlow up to 1.15.3/2.0.2/2.1.1/2.2.0/2.3.0 TFLite Model null pointer dereference


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Build sound classification models for mobile apps with Teachable Machine and TFLite


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Operator divide by zero


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Operator space_to_depth.cc divide by zero


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Operator depthwise_conv.cc divide by zero


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Operator lite/kernels/one_hot.cc divide by zero


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Operator lite/kernels/split.cc num_splits divide by zero


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ TFLite delegates


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Profiling XNNPACK with TFLite


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ TensorFlow Recommenders integration with TFLite and TFX


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Announcing TFLite Task Library in Google Play Services


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Simpleperf case study: Fast initialization of TFLiteโ€™s Memory Arena


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Operator space_to_batch_nd.cc divide by zero


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Operator embedding_lookup.cc divide by zero


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Operator depth_to_space.cc divide by zero


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Operator batch_to_space_nd.cc divide by zero


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Operator maximum_minimum.h out-of-bounds read


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Operator reference_ops.h divide by zero


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Operator optimized_ops.h divide by zero


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite lite/kernels/padding.h divide by zero


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Model arg_min_max.cc ArgMin/ArgMax out-of-bounds write


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Google TensorFlow up to 2.1.3/2.2.2/2.3.2/2.4.1 TFLite Model lite/kernels/split_v.cc Split_V out-of-bounds read


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Building a board game with the TFLite plugin for Flutter


๐Ÿ“ˆ 23.15 Punkte

๐Ÿ“Œ Introduction to format string vulnerabilities - Introduction to Binary Exploitation - Hack The Box Leet Test


๐Ÿ“ˆ 21.25 Punkte

๐Ÿ“Œ Whatโ€™s Wrong With SMS Authentication? Two IBM Experts Weigh In on the NIST Recommendation


๐Ÿ“ˆ 16.54 Punkte

๐Ÿ“Œ W3C Recommendation: HTML 5.1 ist fertig


๐Ÿ“ˆ 16.54 Punkte

๐Ÿ“Œ Whatโ€™s Wrong With SMS Authentication? Two IBM Experts Weigh In on the NIST Recommendation


๐Ÿ“ˆ 16.54 Punkte

๐Ÿ“Œ 2016 MacBook Pro Fails To Receive a Recommendation From Consumer Reports


๐Ÿ“ˆ 16.54 Punkte

๐Ÿ“Œ W3C Recommendation: HTML 5.1 ist fertig


๐Ÿ“ˆ 16.54 Punkte

๐Ÿ“Œ Appleโ€™s MacBook Suffering from Battery Inconsistency, Loses Top Recommendation


๐Ÿ“ˆ 16.54 Punkte











matomo