[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-656172-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-656172-en":131,"doc-similar-656172":172},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","tensor-cookbook-mastering-tensors-through-diagrams","Tensor Cookbook - Mastering Tensors through Diagrams","","High-dimensional data in machine learning, signal processing, computational physics, and statistics are naturally modeled as tensors, but direct tensor manipulation becomes difficult as tensor order grows due to exponential parameter growth and complex indexed algebra. Tensor networks provide an effective framework using diagrammatic graphical language to encode contractions and reveal structural properties. This manuscript offers a self-contained guide to key tensor operations, classical decompositions, gradient derivations, and random tensor networks for probability distributions, delivering shorter and clearer proofs of classical identities and bounds.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/tensor-cookbook-mastering-tensors-through-diagrams/656172/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/tensor-cookbook-mastering-tensors-through-diagrams/656172.png","ImageObject",300,407,{"name":42,"@type":43},"Cipher","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-28","2026-10-25",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",11,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"Why are tensor networks useful for high-dimensional tensors?","Question",{"text":63,"@type":64},"Direct manipulation becomes challenging as tensor order increases because parameters grow exponentially and indexed algebra becomes hard to interpret and implement. Tensor networks address these challenges with a graphical language that encodes contractions and exposes structure more transparently.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What operations does the manuscript cover using diagrammatic tensor network notation?",{"text":68,"@type":64},"The manuscript presents main operations such as contractions, products, and reshaping. It also expresses classical tensor decompositions and related computations within the tensor network framework.",{"name":70,"@type":61,"acceptedAnswer":71},"How are gradients and probability distributions handled in this approach?",{"text":72,"@type":64},"Tensor networks simplify gradient derivations by providing diagrammatic tools for computations like Jacobians. They also support expressing probability distributions and computing expectations of random tensor networks through tensor decompositions.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},656172,1793150467,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,111,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},6,"Technology",50,"technology",{"id":107,"doc_module":4,"doc_module_name":25,"category_name":108,"show_sort_weight":109,"slug":110},7,"Healthcare",40,"healthcare",{"id":112,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":113,"slug":114},8,30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":112,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":140,"language":141,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":12,"update_tm":145,"read_time":146,"preview_page_count":102,"preview_urls":147},687208528416,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","Tensor Cookbook: Mastering Tensors through Diagrams  \nBeheshteh T. Rakhshan1 ,2 , Guillaume Rabusseau1 ,2 ,3  \n1Mila & DIRO, 2 Université de Montréal, 3 CIFAR AI Chair  \narXiv : 2605 . 166 10v2 [cs .LG] 20 Oct 2026  \nContents  \n1 Tensor Networks Basics 6  \n1.1 What are Tensor Networks? ........................................ 6  \n1.2 Inner Product, Outer Product, Trace and Norm .............................. 9  \n1.3 Copy Tensors (Hyperedges) ........................................ 12  \n1.4 Matrix Factorization in Tensor Networks ................................. 15  \n2 Operations on Tensors 16  \n2.1 Permute and Reshape Tensors ...................................... 16  \n2.2 Products .................................................. 17  \n2.3 Some Useful Properties of Tensor Networks ............................... 23  \n3 Tensor Decompositions 26  \n3.1 CANDECOMP/PARAFAC (CP) Decomposition ............................ 26  \n3.2 Tucker Decomposition .......................................... 28  \n3.3 Tensor Train (TT) Decomposition .................................... 31  \n3.4 Efficient Operations in TT Format .................................... 34  \n3.5 Other decompositions: Tensor Ring, PEPS & Hierarchical Tucker ................... 37  \n4 Computing Gradients of Tensor Networks 38  \n4.1 Jacobians ................................................. 38  \n4.2 Applications ................................................ 41  \n5 Probability Distributions and Random Tensor Networks 43  \n5.1 Probability Distributions and Tensor Decompositions .......................... 43  \n5.1.1 Probability Distributions as Tensors ............................... 44  \n5.1.2 Tensor Train Parameterization of Probability Distributions ................... 45  \n5.2 Computing Expectations of Random Tensor Networks ......................... 47  \n6 Conclusion 53  \nNotations  \na Scalar; A rank-0 tensor  \nv Column vector; A rank-1 tensor  \nM A matrix; equivalently, a rank-2 tensor or tensor of order 2  \nT ∈ Rd1 ×···×dN An N-th order tensor G ∈ Rd1 ×d2 ×d3 A third-order tensor  \nGi,j,k The (i, j, k)-th element of G  \nGi,:,k Mode-2 fiber of a third-order tensor G, equivalent to a vector v ∈ Rd2  \nG (2) Mode-2 matricization of G, equivalent to a matrix M ∈ Rd2 ×d1 d3  \nvec(G) A vectorization of G equivalent to a vector v ∈ Rd1 d2 d3  \nS ◦ T The tensor product (equiv. outer product) of tensors S and T ⟨G , B⟩ Inner product between tensors G and B  \n∥G∥F Frobenius norm of the tensor G  \nS ⊗ T The Kronecker product of tensors S and T  \nMT The transposed matrix of matrix M  \nId The identity matrix of size d  \nM ⊙ B The Khatri-Rao product of matrices M and B  \nM ∗ B The Hadamard product of matrices M and B  \nTensor Network Notations  \nZero-order tensor (scalar) First-order tensor (vector) Second-order tensor (matrix) Third-order tensor  \nTensor element  \nN-th order tensor  \nMode-2 matricization Vectorization  \nOuter product of two tensors  \nInner product of two tensors  \nFrobenius norm of a tensor  \nKronecker product of two tensors Identity matrix  \nKronecker delta  \nKhatri-Rao product  \nHadamard Product  \nDiagonal matrix  \nLeft-orthogonal Matrix Right-orthogonal Matrix  \na ∈ R  d  ∈ Rd  \nd1 d2  \n~~ ~~ M ~~  ~~ d1  G d2   \n∈  \n∈  \nd3   \ni1  G   \ni3  \nRd1 ×d2  \nRd1 ×d2 ×d3  \ni2  \n∈ Rd1 ×···×dN  \n~~ ~~d2~~ ~~ G ~~ ~~d~~ ~~1d~~ ~~3~~ ~~ ∈ Rd2 ×d1 d3  \n~~  ~~d~~ ~~1d~~ ~~3~~ ~~ d2 ∈ Rd1 d2 d3  \n d1   \nd2  \nG  \nd3 d4 d5  \n~~ ~~ ~~ ~~ B ~~ ~~  \n∈ Rd1 ×d2 ×d3 ×d4 ×d5  \nd1  \nG  d2  B ∈ Rd3  \n d 1d 2  ∈ Rd3  \n| S ⊗ T |\n| --- |\n|  |\n\n∈ Rd1 d4 ×d2 d5 ×d3 d6  \nd1  d4 d2  d5 d3  d6 Id =  d  ∈ Rd×d  \ni ~~ ~~R~~ ~~ j = i ~~ ~~ j = δij = (10  \nA B ∈ Rd1 d2 ×R  \nd1  d2  d1  \nA B ∈ Rd1 ×d2  \nd2  \n d  d  ∈ Rd×d  m  U  n  ∈ Rm ×n  \n m  V  n  ∈ Rm ×n  \nif i = j otherwise  \nIntroduction  \nHigh–dimensional data arise naturally in many areas of science and engineering, including machine learning, signal processing, computational physics, and statistics. Such data are often represented as tens","cbCaisKjHYoyxoKQ","https://ap.wps.com/l/cbCaisKjHYoyxoKQ","pdf",770988,55,"English","# Tensor Networks Basics\n## What are Tensor Networks?\n## Inner Product, Outer Product, Trace and Norm\n## Copy Tensors (Hyperedges)\n## Matrix Factorization in Tensor Networks\n# Operations on Tensors\n## Permute and Reshape Tensors\n## Products\n## Some Useful Properties of Tensor Networks\n# Tensor Decompositions\n## CANDECOMP/PARAFAC (CP) Decomposition\n## Tucker Decomposition\n## Tensor Train (TT) Decomposition\n## Efficient Operations in TT Format\n## Other decompositions: Tensor Ring, PEPS & Hierarchical Tucker\n# Computing Gradients of Tensor Networks\n## Jacobians\n## Applications\n# Probability Distributions and Random Tensor Networks\n## Probability Distributions and Tensor Decompositions\n## Computing Expectations of Random Tensor Networks\n# Conclusion","[{\"question\":\"Why are tensor networks useful for high-dimensional tensors?\",\"answer\":\"Direct manipulation becomes challenging as tensor order increases because parameters grow exponentially and indexed algebra becomes hard to interpret and implement. Tensor networks address these challenges with a graphical language that encodes contractions and exposes structure more transparently.\"},{\"question\":\"What operations does the manuscript cover using diagrammatic tensor network notation?\",\"answer\":\"The manuscript presents main operations such as contractions, products, and reshaping. It also expresses classical tensor decompositions and related computations within the tensor network framework.\"},{\"question\":\"How are gradients and probability distributions handled in this approach?\",\"answer\":\"Tensor networks simplify gradient derivations by providing diagrammatic tools for computations like Jacobians. They also support expressing probability distributions and computing expectations of random tensor networks through tensor decompositions.\"}]","Tensor Cookbook - Mastering Tensors through Diagrams | PDF",1792966837,139,[148,152,156,160,164,168],{"page_no":22,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/7ee8d817f6abe05ae9200f7a45d941ed.webp",983,1272,{"page_no":26,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/b9930c7004d37d65607231a3d7b411b8.webp",982,1270,{"page_no":30,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/d94222d2411a723b6e4153d5db06be2f.webp",981,1269,{"page_no":33,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/b29815edadd5f0a2d7be2cf781f5d1bf.webp",980,1268,{"page_no":97,"url":165,"width":166,"height":167},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/5f459d91601a74509dda16cb6202c5f7.webp",979,1267,{"page_no":102,"url":169,"width":170,"height":171},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/bc7b575d81f162100299a4c8743620e3.webp",978,1265,{"list":173,"token":11},[174,181,188,195,201,207,213,220,227,234],{"doc_id":175,"doc_title":176,"file_type":138,"home_preview_img_url":177,"slug":178,"view_count":179,"category_name":29,"create_tm":180},82745,"The Multilinear Forms Cayley Graph and the Eigenvalue Method for Tensor Codes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808907010/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108999&Signature=0aGx%2BpJoH6lNBTaJuGDbe604V%2FA%3D","the-multilinear-forms-cayley-graph-and-the-eigenvalue-method-for-tensor-codes",27,1784182640,{"doc_id":182,"doc_title":183,"file_type":138,"home_preview_img_url":184,"slug":185,"view_count":186,"category_name":29,"create_tm":187},118703,"Quantum-Classical Machine learning by Hybrid Tensor Networks","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229834762140/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108999&Signature=yGERCs2d8Kqt35pTYfjlruOAD5U%3D","quantum-classical-machine-learning-by-hybrid-tensor-networks",26,1785684983,{"doc_id":189,"doc_title":190,"file_type":138,"home_preview_img_url":191,"slug":192,"view_count":193,"category_name":29,"create_tm":194},118540,"Tensor Networks in Machine Learning - Bachelor’s thesis","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229834755421/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108999&Signature=QPe9UQXUEFUohQeZWZO8pFkLo90%3D","tensor-networks-in-machine-learning-bachelors-thesis",18,1785684056,{"doc_id":196,"doc_title":197,"file_type":138,"home_preview_img_url":198,"slug":199,"view_count":113,"category_name":29,"create_tm":200},85307,"Adaptive Krylov Methods for Low-Rank Exponential Integrators","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809300069/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108999&Signature=NV6x4AzT5sljJgaDF3Vv6iVw5LQ%3D","adaptive-krylov-methods-for-low-rank-exponential-integrators",1784202380,{"doc_id":202,"doc_title":203,"file_type":138,"home_preview_img_url":204,"slug":205,"view_count":179,"category_name":29,"create_tm":206},123168,"Non-Euclidean Monotone Operator Theory and Applications","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229836983630/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108999&Signature=y8BLaNUZBE2O%2B46nF2SUEredOEY%3D","non-euclidean-monotone-operator-theory-and-applications",1785815012,{"doc_id":208,"doc_title":209,"file_type":138,"home_preview_img_url":210,"slug":211,"view_count":179,"category_name":29,"create_tm":212},84924,"Quantum-inspired Methods for Finite-element Discretizations of the High-dimensional Poisson Equation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809078607/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108999&Signature=bdLvIQqPA8iIm5uMwj7ZgIZ9L%2Fg%3D","quantum-inspired-methods-for-finite-element-discretizations-of-the-high-dimensional-poisson-equation",1784199366,{"doc_id":214,"doc_title":215,"file_type":138,"home_preview_img_url":216,"slug":217,"view_count":218,"category_name":29,"create_tm":219},83732,"On Determining the Convergence Rate of an Infinite Product of Stochastic Matrices","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809089699/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108999&Signature=I%2Fe9qMgyqOAyAietvYYI3i0b%2Ffo%3D","on-determining-the-convergence-rate-of-an-infinite-product-of-stochastic-matrices",21,1784190062,{"doc_id":221,"doc_title":222,"file_type":138,"home_preview_img_url":223,"slug":224,"view_count":225,"category_name":29,"create_tm":226},86253,"Tropical Circuits with Scalar Multiplication Gates","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809394421/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108999&Signature=fBmc3n4nzPW9tcja6qaqDRnPs6s%3D","tropical-circuits-with-scalar-multiplication-gates",25,1784209835,{"doc_id":228,"doc_title":229,"file_type":138,"home_preview_img_url":230,"slug":231,"view_count":232,"category_name":29,"create_tm":233},85581,"The Power of Unentanglement Without Destructive Interference","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809329420/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108999&Signature=PcfKNlLCN%2FQIgEY446H7CRTyJKA%3D","the-power-of-unentanglement-without-destructive-interference",16,1784204729,{"doc_id":235,"doc_title":236,"file_type":138,"home_preview_img_url":237,"slug":238,"view_count":118,"category_name":29,"create_tm":239},119486,"Tensor-Variate Machine Learning on Graphs - Doctor of Philosophy Thesis","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229835132888/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108999&Signature=wUYFiaK908ZyofLEH%2BV%2FotE%2B2vE%3D","tensor-variate-machine-learning-on-graphs-doctor-of-philosophy-thesis",1785724568]