Urgent.News

What's breaking now, across hundreds of outlets.

AI

I Tried to Teach a Computer "Apple" (It Thought It Was a Fruit, an iPhone, and a Vector)

Hello, DEV Community! 🙌 It’s my first time writing here. As I was studying how models handle text today, I ran into a funny realization: computers don't understand human words at all. They only understand numbers. So how do we explain to a model that a cat is a pet, an apple can be a fruit or a tech company? Here is what I learned today about Word Embedding , explained from a pure logic and…

Hello, DEV Community! 🙌 I'm writing my first post here on the topic of how computers understand language. As I explored how models handle text, I realized the surprising truth: computers don't comprehend human words, they only understand numbers. To make a computer grasp concepts like words having multiple meanings, I discovered the power of word embedding techniques.

The first step in turning words into numbers is one-hot encoding. This method assigns a unique binary code to each word in a giant list. For example, the words "cat," "dog," and "apple" would be represented as separate arrays of 1s and 0s. However, this approach has significant drawbacks - it wastes a tremendous amount of memory by creating large arrays filled with unnecessary zeros.

Moreover, computers don't have any inherent understanding of the relationships between words; they treat each word as a completely separate entity.

Researchers like Mikolov et al. at Google introduced a more efficient alternative called Word Embedding. Instead of using one-hot encoding, Word Embedding represents words as points in a high-dimensional space. These points are plotted using dozens to hundreds of invisible dimensions, each representing a hidden concept such as "is_animal," "is_food," "is_tech," or "grammatical_type." For instance, the word "apple" would be plotted near the cluster of fruit-related concepts and also close to the "iPhone" neighborhood.

The computer learns these coordinates by sliding a "context window" across millions of sentences on the internet. It observes which words consistently appear together in similar contexts, allowing it to cluster words with similar meanings in close proximity on the coordinate map. Because the computer processes vast amounts of data, it effectively "reads" the relationships between words and places them accordingly on the vector space.

One of the most fascinating aspects of word embedding is the ability to perform mathematical operations on word coordinates. For example, the famous equation "King - Man + Woman = Queen" demonstrates how you can manipulate word vectors to derive new meanings. By starting at the coordinate for "King," subtracting the "male" direction, and adding the "female" direction, the resulting coordinate lands on the "Queen" word.

This powerful geometric concept showcases the deep semantic connections that word embedding techniques can reveal.

In conclusion, word embedding provides a valuable framework for bridging the gap between machine language and human language. By representing words as high-dimensional points in a geometric space, computers can begin to understand the nuanced relationships and meanings inherent in human words. This innovative approach has opened up exciting possibilities for natural language processing and has become an essential tool in modern AI applications.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in AI

AI Autonomy: How to Find the Autonomy Your Agents Already Have

TL;DR A framework for measuring autonomy: The Cloud Security Alliance's six-level model (Level 0 to Level 5) gives security teams language for how independently an AI agent can act, from…

  • AI autonomy increases as agentic AI proliferates
  • Cloud Security Alliance provides five-level framework for autonomy
  • AI-service credentials surged 81% to over 1.27 million globally

Playwright MCP for Claude Code: Let It Open a Real Browser and Click Through Flows (2-Minute Setup)

You ask Claude Code why the signup flow breaks, and it can only guess from the source. So you open the page, click through it yourself, copy what you see, and describe it back in words.

  • Playwright MCP server enhances Claude Code's web automation capabilities.
  • Setup takes approximately two minutes, involving a single command and Claude restart.
  • Claude can now navigate to URLs and read main page headings using Playwright MCP.

Superintelligence Accord: Trump Renames AI ‘SI’ as 6 Tech Chiefs Sign Voluntary ‘Constitution’

Trump says AI is now ‘SI’ and calls the superintelligence accord ‘almost like a constitution’. We read every line of the one-page pledge — and explain why it came now, with data-centre anger rising…

  • President Trump renamed AI as "Superintelligence" and signed a voluntary accord.
  • Six tech companies, Meta, Google, Microsoft, Amazon, AMD, and Palantir, participated in the accord.
  • The accord lacks specific auditor, standard, deadline, or penalty, making it voluntary.

More from Wednesday 30 September →