2 min readfrom Machine Learning

[P] Wine synthesis using VAE [P]

Our take

Leveraging variational autoencoders (VAEs) and PyTorch, this project explores the innovative potential of AI to synthesize novel white wine recipes. By mapping the White Wine dataset into a latent space, the model identifies optimal regions and iteratively refines compositions, ultimately generating new recipes evaluated via regression. Results demonstrate scores ranging from 7.30 to 7.58, indicating promising potential.
[P] Wine synthesis using VAE [P]

The recent Reddit post detailing a Variational Autoencoder (VAE) model for white wine synthesis is a compelling demonstration of how generative AI can be applied to surprisingly nuanced domains. The project, undertaken by Dangerous-Pilot-6065, aims to discover novel wine recipes by mapping existing wines into a latent space and then intelligently exploring that space to identify promising combinations. This approach moves beyond simply analyzing existing wines to actively creating new ones, a significant shift in how we might approach food and beverage innovation. It’s a fascinating echo of similar explorations in other creative fields, such as the use of AI to generate music or art, but with the added layer of real-world, sensory evaluation as the ultimate validation metric. This aligns with recent explorations of AI in ranking and optimization, as seen in "Horse racing as an ML ranking problem: 1.18M runners, walk-forward validation and a very strong market baseline [D]," where similar techniques are used to predict outcomes in a complex, data-rich environment. The core concept of navigating a latent space to find optimal solutions is increasingly common in machine learning, but its application to something as subjective and complex as taste is particularly noteworthy.

The technical details presented – the iterative refinement process, the decoder normalization, and the evaluation using a regression model – highlight the challenges of translating latent representations into tangible, palatable results. The author's candid discussion of the loss function and its plateauing raises a crucial point about model validation in generative tasks. Determining "good enough" when the output is inherently subjective is a persistent hurdle. The visualization of the latent space itself is also insightful, providing a glimpse into the underlying structure of the wine dataset and the relationships between different varieties. It’s encouraging to see this project building on previous VAE experience, demonstrating a progression from simpler tasks like MNIST image generation to more complex, real-world applications. The challenges faced by the author are relatable to many navigating the early stages of ML/DL, as evidenced by the ongoing discussions around PhD branding in the ML space, like "PhD branding question [R]," which touches on the importance of showcasing practical projects and developing a strong understanding of core concepts.

The score range of 7.30-7.58, while not explicitly contextualized, suggests a promising level of accuracy for the regression model used to evaluate the generated recipes. The fact that this project is being shared publicly and openly invites valuable feedback and collaboration, accelerating the learning process for the author and potentially leading to further refinements of the model. This kind of open-source exploration is vital for driving innovation in the field, particularly as the complexity of AI models continues to increase. Furthermore, the project’s focus on a specific, well-defined dataset (white wine) demonstrates the value of starting with manageable problems before tackling broader, more ambiguous challenges. The comparison with other ML tools, such as "Astra vs. Fable 5.1 on real ML tasks -- tradeoffs, strengths, shortcomings [P]," reinforces the need for careful consideration of the tools and frameworks best suited for specific applications.

Looking ahead, it’s intriguing to consider the potential for this approach to be expanded to other food and beverage categories, or even to personalized recipe generation based on individual taste preferences. Could we see AI-powered chefs crafting entirely new culinary experiences? The current project serves as a compelling proof-of-concept, demonstrating that AI can be a valuable tool for creative exploration and innovation, even in domains traditionally considered the realm of human expertise. A key question remains: how can we best integrate human sensory evaluation into the training loop to ensure that AI-generated recipes are not only statistically optimal but also genuinely enjoyable?

[P] Wine synthesis using VAE [P]

I have created a VAE model using PyTorch on White Wine dataset.

Basically, the main goal is to discover a brand-new white wine recipe.

It puts all the wines into a latent space, finds the best part where higher bands are located, and then it makes 100 steps with a step size of 0.5, multiplying by 0.96 with every step till it reaches the highest possible score.

The regression model then evaluates the newly generated wine recipe, after first passing the latent coordinates through a decoder, and normalizing them.

I get a score in range of 7.30-7.58.

https://preview.redd.it/bylmwhu92iph1.png?width=249&format=png&auto=webp&s=b97f36f3deca86da85dddbba9b65043978ce4fd3

Here is the visualization of the latent space of all the wines:

https://preview.redd.it/phzb0hokriph1.png?width=798&format=png&auto=webp&s=84fc3d85dd9499980106e710379c92b834692c29

A small question about the training loop:

https://preview.redd.it/03k4k5yq2iph1.png?width=262&format=png&auto=webp&s=7e0df68447e5ab26d680af08f5b9361b14af168c

Is the loss too large? I know that it never could reach perfect zero by how do I know if the loss is good enough? After reaching the plato? I use MSELoss.

The repo itself: https://github.com/theaidenmax/tabular-vae-wine-generator

This is my second project in VAE (after MNIST), and I really liked idea of autoencoders.

And I also would be very grateful for your tips, etc, since this is one of my first steps in ML/DL.

submitted by /u/Dangerous-Pilot-6065
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article