How we use word embeddings and AI:
from seating arrangements to data analysis
Creating the perfect seating arrangement is a challenge we can all relate to, whether it’s a private party or a large corporate event. Should I seat Anna next to Henrik, or will she be annoyed by what he does for work? Maybe Joanna would bring more energy if placed at the corner of the table? As the number of guests increases, so does the complexity, exponentially.
My name is Christian von Koch, and I work as a Senior Machine Learning Engineer here at Elvenite. Together with my colleague Mikaela Åhlén, a Data Scientist, we were tasked with creating an “optimal” seating arrangement for our corporate event with 450 participants.
But what does an optimal arrangement mean? By using techniques like word embeddings in Natural Language Processing (NLP), AI can understand semantic relationships, such as how “being out on the lake” and “sailing” relate to each other, even if different words are used. This technology plays a significant role in how AI can manage and optimize complex tasks, which we will explore further in this article.
Why AI is crucial for solving complex problems
How we solved the seating arrangement: Optimization with smart algorithms
- A woman should preferably have at least one female neighbor, and vice versa for men.
- Spread out participants based on company affiliation.
- Spread out participants based on location.
- Seat participants near others with similar interests.
- Seat participants near others of a similar age.
This way, we could calculate a concrete score for how good the seating arrangement was.
To optimize the seating, we treated it as a classic optimization problem: how do we arrange all 450 participants to minimize the total cost? The algorithm we designed to solve the seating problem was relatively simple but very powerful. It is based on algorithmic optimization, which can be applied to many other business problems. By using an algorithm, we could quickly identify the best possible combinations to minimize costs and maximize the guest experience.
Step-by-step: How we optimized the seating with our algorithm
1. Start with a random seating arrangement.
2. Iterate to convergence/max number of iterations: Select two random people and switch their seats if the cost decreases with the swap.
3. Swap up to four different random pairs of people. This will almost always temporarily increase the cost but is done to escape local minima in an attempt to approach the global minimum of the cost function.
4. Iterate to convergence/max number of iterations: Select two random people and switch their seats if the cost decreases with the swap.
5. Check if steps 3-4 led to a local minimum associated with a lower cost.
– If yes, continue from this seating arrangement.
– If no, revert to the seating arrangement before step 3.
6. Repeat steps 3-5 until convergence.
Figure 1: How the cost function decreases during optimization.
Embeddings and language models: How we matched participants’ interests
To compare participants’ interests, which they wrote in free text, we used a technique called Natural Language Processing (NLP) and word embeddings. This allows AI to understand and interpret the underlying meaning of words, going far beyond simple word matching. For example, compare “I like hanging out with friends” with “Spending time with buddies”—even though the words differ, AI can use word embeddings and NLP to analyze the shared meaning and match participants with similar interests.
Word embeddings represent words as vectors in a high-dimensional space and are used to analyze semantic relationships. This is especially valuable for businesses, as AI can interpret large amounts of text data to extract insights from customer feedback, improve HR processes, and even understand trends in market analysis. By understanding the semantic relationships between words, word embeddings give companies a deeper understanding of their data. Each word is given coordinates in thousands of dimensions, which algorithms have learned by analyzing large amounts of text. Words are placed close to each other in this high-dimensional space if they are used in similar contexts.
For example, even though the words “king” and “queen” are not linguistically similar, they both describe royal roles and have similar relationships to words like “throne” and “crown.” These words will therefore be placed “near” each other in the high-dimensional space – see Figure 2.
Figure 2: A simplified image of the words King, Queen, Apple in the form of embeddings
(here visualized in 3D instead of the high-dimensional space).
With this model, we could transform all participants’ interests into vectors and then compare the angle differences between them to see how similar the interests were. This way, we could match someone who likes “horse riding” and “board games with friends” with someone whose interests were “hanging out at the stable” and “social games.”
How our optimized seating arrangement created engagement and meaningful conversations
So how did it go after we created our framework for an “optimal” seating arrangement? The feedback from the conference participants was overwhelmingly positive. Despite guests being seated with people from different companies, cities, and age groups, they had plenty to talk about—thanks to AI helping us match them based on their interests.
Here are some comments from participants:
“Great job with the seating arrangement! It contributed to the best corporate dinner I’ve attended in years!”
“Fantastically thought out! I was seated next to colleagues I hadn’t met before, but we had a lot in common. A very successful arrangement that sparked interesting discussions throughout the evening!”
“The seating was perfect! Even though we came from different parts of the company and different departments, it felt like we shared the same interests, and it made for a really fun evening!”
This shows how the power of data, optimization, NLP, and AI can solve complex problems—in this case, arranging an almost perfect seating plan for 450 participants. And the technology is far from limited to event planning.
If your company faces complex decisions or needs to analyze large amounts of customer feedback, AI-driven decision support could be the solution. With the help of techniques like automated text analysis and word embeddings, AI can quickly process data and provide valuable insights that improve decision-making.
Contact us if you want to learn more about smart AI solutions!
At Elvenite, we have extensive experience using AI solutions to solve complex business challenges. With our data-driven analyses and technical expertise, we can help your company make smarter decisions and improve both internal processes and customer experiences. Contact us to discover how we can implement these solutions for you!
News. Insights. Thoughts.
Elvenite ranked as one of the best places to work in the IT industry in 2024
Elvenite ranked as one of the IT industry's Best Workplaces 2024 Elvenite has been named one of Sweden's Best IT Workplaces for 2024, a prestigious award from Great Place To Work®. Elvenite is ranked 15th out of 25, celebrating our outstanding workplace culture and...
When milk production flows steadily, year-round
Ensuring steady milk production all year round with AIDid you know that milk production fluctuates significantly throughout the year? While we, as consumers, buy milk at the same pace regardless of the season, dairies like Valio face major challenges. During the...
RELEX Solutions and Elvenite Partner to Deliver Holistic Supply Chain Solutions
RELEX Solutions and Elvenite partner to deliver holistic supply chain solutions The strategic partnership will enhance data-driven decision making and operational efficiency in the Nordic food and beverage sector Stockholm, Sweden – September 18, 2024 – RELEX...