ArticleslgStudy

science

Tensor sketch

Tensor sketch is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Tensor sketch rather than just read about it. In short: In statistics, machine learning and algorithms, a tensor sketch is a type of dimensionality reduction that is particularly efficient when applied to vectors that have tensor structure. Such a sketch can be used to speed up explicit kernel methods, bilinear pooling in neural networks and is a cornerstone in many numerical linear algebra algorithms.

Tensor sketch — main illustration
Tensor sketch — illustration

Key takeaways

  • Tensor sketch belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Tensor sketch to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Tensor sketch from memory before moving on to harder problems.

Reference excerpt

In statistics, machine learning and algorithms, a tensor sketch is a type of dimensionality reduction that is particularly efficient when applied to vectors that have tensor structure. Such a sketch can be used to speed up explicit kernel methods, bilinear pooling in neural networks and is a cornerstone in many numerical linear algebra algorithms.

Mathematical definition Mathematically, a dimensionality reduction or sketching matrix is a matrix M ∈ R k × d {\displaystyle M\in \mathbb {R} ^{k\times d}} , where k < d {\displaystyle k<d} , such that for any vector x ∈ R d {\displaystyle x\in \mathbb {R} ^{d}}

| ‖ M x ‖ 2 − ‖ x ‖ 2 | < ε ‖ x ‖ 2 {\displaystyle |\|Mx\|_{2}-\|x\|_{2}|<\varepsilon \|x\|_{2}}

with high probability. In other words, M {\displaystyle M} preserves the norm of vectors up to a small error. A tensor sketch has the extra property that if x = y ⊗ z {\displaystyle x=y\otimes z} for some vectors y ∈ R d 1 , z ∈ R d 2 {\displaystyle y\in \mathbb {R} ^{d_{1}},z\in \mathbb {R} ^{d_{2}}} such that d 1 d 2 = d {\displaystyle d_{1}d_{2}=d} , the transformation M ( y ⊗ z ) {\displaystyle M(y\otimes z)} can be computed more efficiently. Here ⊗ {\displaystyle \otimes } denotes the Kronecker product, rather than the outer product, though the two are related by a flattening. The speedup is achieved by first rewriting M ( y ⊗ z ) = M ′ y ∘ M ″ z {\displaystyle M(y\otimes z)=M'y\circ M''z} , where ∘ {\displaystyle \circ } denotes the elementwise (Hadamard) product. Each of M ′ y {\displaystyle M'y} and M ″ z {\displaystyle M''z} can be computed in time O ( k d 1 ) {\displaystyle O(kd_{1})} and O ( k d 2 ) {\displaystyle O(kd_{2})} , respectively; including the Hadamard product gives overall time O ( d 1 d 2 + k d 1 + k d 2 ) {\displaystyle O(d_{1}d_{2}+kd_{1}+kd_{2})} . In most use cases this method is significantly faster than the full M ( y ⊗ z ) {\displaystyle M(y\otimes z)} requiring O ( k d ) = O ( k d 1 d 2 ) {\displaystyle O(kd)=O(kd_{1}d_{2})} time. For higher-order tensors, such as x = y ⊗ z ⊗ t {\displaystyle x=y\otimes z\otimes t} , the savings are even more impressive.

History The term tensor sketch was coined in 2013 describing a technique by Rasmus Pagh from the same year. Originally it was understood using the fast Fourier transform to do fast convolution of count sketches. Later research works generalized it to a much larger class of dimensionality reductions via Tensor random embeddings. Tensor random embeddings were introduced in 2010 in a paper on differential privacy and were first analyzed by Rudelson et al. in 2012 in the context of sparse recovery. Avron et al. were the first to study the subspace embedding properties of tensor sketches, particularly focused on applications to polynomial kernels. In this context, the sketch is required not only to preserve the norm of each individual vector with a certain probability but to preserve the norm of all vectors in each individual linear subspace. This is a much stronger property, and it requires larger sketch sizes, but it allows the kernel methods to be used very broadly as explored in the book by David Woodruff.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Tensor sketch

Start with the simplest possible case. Write down what Tensor sketch claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Tensor sketch before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Tensor sketch ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Tensor sketch

In research
Tensor sketch appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Tensor sketch in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Tensor sketch is common in secondary-school and first-year university syllabi. It links to neighbouring topics Dimension reduction, Tensors, so understanding it makes those chapters shorter.
In everyday life
Look for Tensor sketch outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Tensor sketch” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Tensor sketch in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Tensor sketch means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Tensor sketch out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Tensor sketch in simple terms?

In statistics, machine learning and algorithms, a tensor sketch is a type of dimensionality reduction that is particularly efficient when applied to vectors that have tensor structure. Such a sketch can be used to speed up explicit kernel methods, bilinear pooling in neural networks and is a corner…

Why does Tensor sketch matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Tensor sketch?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Tensor sketch.

Tags

  • Dimension reduction
  • Tensors

Keep exploring