<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog | Koehn AI</title><link>https://www.koehn.ai/en/blog/</link><atom:link href="https://www.koehn.ai/en/blog/index.xml" rel="self" type="application/rss+xml"/><description>Blog</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-US</language><lastBuildDate>Wed, 02 Dec 2026 00:00:00 +0000</lastBuildDate><image><url>https://www.koehn.ai/media/logo.svg</url><title>Blog</title><link>https://www.koehn.ai/en/blog/</link></image><item><title>Upgrading and Retrofitting: How Additional Data Improves Industrial Processes</title><link>https://www.koehn.ai/en/blog/upgrades_and_retrofitting/</link><pubDate>Wed, 02 Dec 2026 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/upgrades_and_retrofitting/</guid><description>&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="data_problems"
srcset="https://www.koehn.ai/media/blog/upgrades_and_retrofitting_hu_c27bad16f2b2d0a2.webp 320w, https://www.koehn.ai/media/blog/upgrades_and_retrofitting_hu_5815c694843cbb9.webp 480w, https://www.koehn.ai/media/blog/upgrades_and_retrofitting_hu_d3c851978dc7522b.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/upgrades_and_retrofitting_hu_c27bad16f2b2d0a2.webp"
width="760"
height="725"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="how-to-collect-data"&gt;How to Collect Data&lt;/h2&gt;
&lt;p&gt;In our
, we discussed the value of data to organizations, and the necessity of creating a pipeline for collection, harmonization, and processing into a &lt;strong&gt;coherent database&lt;/strong&gt;.
However, exactly &lt;strong&gt;how&lt;/strong&gt; and &lt;strong&gt;where&lt;/strong&gt; to collect data are open questions.
These exact decisions are dependent on the organization and its goals.
For institutions in the financial sector, collection of economic data is an imperative.
For those in the industrial sector, data from the factory floor is far more important.&lt;/p&gt;
&lt;p&gt;Since in the previous article we looked at an industrial example, we will continue to do so here.&lt;/p&gt;
&lt;h2 id="the-intuition-trap-how-legacy-workflows-affect-manufacturing"&gt;The Intuition Trap: How Legacy Workflows Affect Manufacturing&lt;/h2&gt;
&lt;p&gt;At the heart of every developed economy resides a linchpin that allows it all to function: &lt;strong&gt;manufacturing&lt;/strong&gt;.
The industrial world crumbles without the goods manufacturers produce.
Without automobiles, trains, airplanes, precision machinery, or any of the other plethora of products that enable the functioning of our society, our economies would be smaller and the quality of life lower.
However, due to the entanglement of manufacturing with society, &lt;strong&gt;second-order effects of inefficient industrial processes trickle into every single sector&lt;/strong&gt;.
These inefficiencies drive up the price of goods, ultimately reducing demand for manufactured outputs.&lt;/p&gt;
&lt;p&gt;In traditional manufacturing environments, &lt;strong&gt;operational decisions&lt;/strong&gt; often rest on &lt;strong&gt;experienced judgment&lt;/strong&gt;.
A veteran line manager knows how the machines on the production line sound when they are running well or how various cycles shift seasonally.
This experience is what keeps plants running in a &lt;strong&gt;dynamic environment&lt;/strong&gt;; however, it has the limitations placed on it by biology.
While &lt;strong&gt;human intuition&lt;/strong&gt; and senses allow us to make precise decisions that seem random to an unskilled person, they can be &lt;strong&gt;enhanced&lt;/strong&gt; by the sensitivity of &lt;strong&gt;modern sensors&lt;/strong&gt;.
When paired with &lt;strong&gt;advanced algorithms&lt;/strong&gt;, sensors enable a drastic improvement to the capabilities of workers on factory floors.&lt;/p&gt;
&lt;p&gt;Teams using legacy workflows are &lt;strong&gt;highly susceptible&lt;/strong&gt; to applying intuition where it does not fit.
This does not arise out of &lt;strong&gt;ignorance&lt;/strong&gt; but from the application of &lt;strong&gt;past knowledge&lt;/strong&gt; in a regime where the root causes are different.
Variations in a manufacturing process may be treated as normal, but instead are variations that lead to operational waste, which could be detected with &lt;strong&gt;additional data&lt;/strong&gt;.
Many manufacturers are &lt;strong&gt;hesitant&lt;/strong&gt; to update their industrial process due to upfront capital expense and downtime.
But bridging this gap in operational function &lt;strong&gt;doesn&amp;rsquo;t necessarily require replacing legacy equipment wholesale&lt;/strong&gt;.
Instead, it simply requires instrumenting &lt;strong&gt;critical areas&lt;/strong&gt; to expose what the human touch misses.&lt;/p&gt;
&lt;p&gt;To see how this works in practice, we will examine a practical example in what follows.&lt;/p&gt;
&lt;h2 id="a-practical-example-from-manufacturing"&gt;A Practical Example from Manufacturing&lt;/h2&gt;
&lt;p&gt;To see how targeted instrumentation works on the factory floor, consider a company that manufactures precision laboratory equipment with rotating assemblies—specifically, high-speed centrifuges.
For such devices, where high-quality diagnostics must be implemented in order to ensure the desired quality of the final product, the addition of robust data collection processes can prove highly beneficial.
A particularly useful opportunity to collect this information is during &lt;strong&gt;end-of-line&lt;/strong&gt; (EOL) &lt;strong&gt;testing&lt;/strong&gt;.
Before delivering a centrifuge to a customer, the producer can run the device through a standardized test cycle while sensors record its behavior.
This creates a baseline for each machine and provides &lt;strong&gt;structured data&lt;/strong&gt; for comparison over the product&amp;rsquo;s lifetime and across units.
Even on already existing production lines, a sophisticated EOL testing process can be added without large downtimes or capital expenditures.&lt;/p&gt;
&lt;p&gt;One of the first challenges is deciding &lt;strong&gt;what information is actually worth measuring&lt;/strong&gt;.
The choice of measurements depends on the &lt;strong&gt;physical processes&lt;/strong&gt; involved and what is necessary to ensure a quality product.
This is where a data engineering and AI consultancy can help by identifying which physical quantities are most relevant for monitoring machine health and future AI applications, while avoiding unnecessary instrumentation.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="centrifuge"
srcset="https://www.koehn.ai/media/blog/centrifuge_hu_8a557dc2b27c5477.webp 320w, https://www.koehn.ai/media/blog/centrifuge_hu_5a2c83ca96dbcbd1.webp 480w, https://www.koehn.ai/media/blog/centrifuge_hu_e182e2e740acc814.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/centrifuge_hu_8a557dc2b27c5477.webp"
width="760"
height="507"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;In our centrifuge example, identifying relevant properties is relatively straightforward.
One of the obvious and most informative signals is &lt;strong&gt;vibration&lt;/strong&gt; because vibrational patterns indicate imbalance or mechanical problems in the rotating assembly.
To measure vibration for an EOL test, permanent &lt;strong&gt;piezoelectric accelerometers&lt;/strong&gt; mounted to a test stand, or temporary ones mounted on bearing housings, the motor mount, or the machine frame enable measuring the vibration in multiple directions.
Likewise, monitoring the &lt;strong&gt;motor speed&lt;/strong&gt; via &lt;strong&gt;optical tachometers&lt;/strong&gt; gives similar insight, since a gradual decrease under identical operating conditions may indicate increasing mechanical resistance.&lt;/p&gt;
&lt;p&gt;Additional sensors can provide complementary information.
&lt;strong&gt;Temperature sensors&lt;/strong&gt; or &lt;strong&gt;infrared cameras&lt;/strong&gt; monitoring bearings, motor housing, and cooling airflow detect friction, cooling inefficiencies, or abnormal thermal behavior, identifying minor defects that can be addressed long before they may appear to the end user.
&lt;strong&gt;Power meters&lt;/strong&gt; measuring electrical current can identify flaws in sensitive circuits or rotational instability through abnormal &lt;strong&gt;power consumption&lt;/strong&gt;.
&lt;strong&gt;Microphones&lt;/strong&gt; further complement the monitoring system by detecting minor disturbances in &lt;strong&gt;noise levels&lt;/strong&gt; or unexpected frequency components associated with unbalanced rotating parts.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="mic_simulation"
srcset="https://www.koehn.ai/media/blog/mic_simulation_hu_6306908dc3e0cae8.webp 320w, https://www.koehn.ai/media/blog/mic_simulation_hu_45145590cc06ffa8.webp 480w, https://www.koehn.ai/media/blog/mic_simulation_hu_4723bbcd44799953.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/mic_simulation_hu_6306908dc3e0cae8.webp"
width="760"
height="380"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;figure&gt;
&lt;figcaption&gt;Illustrative acoustic spectrum of a centrifuge operating at 6000 RPM. Changes in the rotational harmonics and the appearance of additional frequency components provide information about mechanical condition.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;These measurements combine to create a &lt;strong&gt;complete picture&lt;/strong&gt; of machine functionality, ensuring customers receive a quality product.
However, raw sensor outputs are only the first step.
A single EOL test run mixes high-frequency acoustic and vibration waveforms with lower-frequency temperature logs, power draw, and optical tachometer readings—all of which must be aligned to the same clock and linked to a specific serial number, component batch, and operator sign-off (see
for a broader look at resolving data fragmentation, Industrial Internet of Things, and cloud providers for data management).&lt;/p&gt;
&lt;p&gt;Once the data has been collected and stored consistently, it can be used for more than validation in EOL tests.
Future versions of products can be designed to include embedded sensors, allowing for active monitoring of the long-term health of the product.
Machine learning models enable &lt;strong&gt;identifying abnormal operating patterns&lt;/strong&gt; and support &lt;strong&gt;predictive maintenance&lt;/strong&gt;.
For example, anomaly detection learns the normal vibration or temperature behavior of a centrifuge and flags deviations.
With sufficient historical degradation or failure data, more advanced models &lt;strong&gt;estimate the Remaining Useful Life&lt;/strong&gt; (RUL) of components and help schedule maintenance before a failure occurs.
Such tools are invaluable to customers, as they give confidence in the product that they purchase and continue to use.&lt;/p&gt;
&lt;h2 id="a-practical-example-for-a-legacy-consumer"&gt;A Practical Example for a Legacy Consumer&lt;/h2&gt;
&lt;p&gt;Manufacturers are not the only ones that can utilize additional data granted by new sensors.
For consumers that have legacy hardware where they wish to monitor the health of their devices, non-invasively &lt;strong&gt;retrofitting&lt;/strong&gt; with new sensors gives that insight.
Sticking with the same example we used for manufacturers improving EOL testing for centrifuges, consumers can collect the &lt;strong&gt;same&lt;/strong&gt; data.&lt;/p&gt;
&lt;p&gt;As centrifuges experience countless cycles, natural fatigue and wear accumulate in the device.
Not all wear leads to failure, but the important part is catching failures &lt;strong&gt;before they happen&lt;/strong&gt;.
Just like for EOL testing, adding a sensor suite to a device gives insight into the functioning of machines at a resolution far beyond human abilities.
For EOL testing, &lt;strong&gt;vibration&lt;/strong&gt;, &lt;strong&gt;motor speed&lt;/strong&gt;, &lt;strong&gt;temperature&lt;/strong&gt;, &lt;strong&gt;power consumption&lt;/strong&gt;, and &lt;strong&gt;operating noise levels&lt;/strong&gt; are key indicators for the &lt;strong&gt;quality&lt;/strong&gt; of a new centrifuge.
For legacy machines, these same indicators provide a snapshot of their &lt;strong&gt;health&lt;/strong&gt;.
Measurements combine to create a more &lt;strong&gt;complete picture&lt;/strong&gt; of machine condition.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Data&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Possible use&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Vibration&lt;/td&gt;
&lt;td&gt;Detect imbalance, bearing wear, or other mechanical degradation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Motor speed (RPM)&lt;/td&gt;
&lt;td&gt;Monitor changes in rotational performance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Temperature&lt;/td&gt;
&lt;td&gt;Detect friction, overheating, or changes in cooling behavior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Power / current&lt;/td&gt;
&lt;td&gt;Identify changes in energy consumption or electrical behavior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Acoustic signal&lt;/td&gt;
&lt;td&gt;Detect changes in noise level and frequency components&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Just as the EOL testing attaches to the end of a production line without major capital expense or downtime, so too does an aftermarket monitoring system.
The addition of external sensors, paired with constructing a coherent database and advanced AI solutions, enables consumers to obtain the longest lifetime out of the devices.&lt;/p&gt;
&lt;h2 id="bridging-the-gap"&gt;Bridging the Gap&lt;/h2&gt;
&lt;p&gt;Modernizing a manufacturing line or retrofitting legacy devices sounds like a straightforward process.
But real hurdles lie in deciphering the interplay between &lt;strong&gt;physics, hardware, and software&lt;/strong&gt;.
Even capable organizations can get caught in &lt;strong&gt;integration purgatory&lt;/strong&gt; due to complex internal dependencies.&lt;/p&gt;
&lt;p&gt;At Koehn AI, we help organizations fill in those gaps with the &lt;strong&gt;scientific expertise&lt;/strong&gt; honed by years in academia and industry.
When you need fresh perspectives without growing your team, &lt;strong&gt;we help bridge the gap from conception to implementation.&lt;/strong&gt;
The goal of modernizing processes is not to spend time implementing the upgrades.
Whether you are looking to integrate data collection into production lines or deploy non-invasive instrumentation on critical legacy devices, we can help you see the benefits as quickly as possible.&lt;/p&gt;</description></item><item><title>From Factory Machines to AI: Building an AI-Ready Data Foundation</title><link>https://www.koehn.ai/en/blog/data_problems/</link><pubDate>Tue, 01 Dec 2026 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/data_problems/</guid><description>&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="data_problems"
srcset="https://www.koehn.ai/media/blog/data_problems_hu_59a710918f504b3c.webp 320w, https://www.koehn.ai/media/blog/data_problems_hu_3f8eedfcbcee1d12.webp 480w, https://www.koehn.ai/media/blog/data_problems_hu_d0be6a559733c7a3.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/data_problems_hu_59a710918f504b3c.webp"
width="760"
height="507"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="the-value-of-data"&gt;The Value of Data&lt;/h2&gt;
&lt;p&gt;In today&amp;rsquo;s information-rich environment, &lt;strong&gt;data&lt;/strong&gt; touches every facet of modern life: &lt;strong&gt;personal data&lt;/strong&gt; drives targeted advertising; &lt;strong&gt;industrial and financial metrics&lt;/strong&gt; guide corporate strategy; and &lt;strong&gt;macroeconomic indicators&lt;/strong&gt; underpin governmental policy decisions.
However, with the glut of available data, quantifying the value of additional data in many circumstances remains difficult.
Most organizations, ranging from small local businesses to governing bodies, rely on familiar metrics and lean heavily on expertise hard-won through years of experience.
And while institutional knowledge and legacy workflows contain their own immense value, they reach a ceiling without &lt;strong&gt;further insight through new data&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The modern industrial world is information hungry because &lt;strong&gt;the value of data compounds as more is collected&lt;/strong&gt;.
For organizations tied to legacy workflows and metrics, uncollected data is unrealized revenue.
Be it through, for example, waste, unseen bottlenecks, or missed quality control tolerances, &lt;strong&gt;untracked information hurts the bottom line&lt;/strong&gt;.
Not only that, &lt;strong&gt;collected but incoherent data&lt;/strong&gt; yields the same results in a more insidious manner.
If existing data is not leveraged in productive manner, that is simply waste.
However, if existing data is unstructured, it can go from unproductive to counterproductive quickly.
The latter is the situation that many companies find themselves in.&lt;/p&gt;
&lt;h2 id="growth-creates-complexity-faster-than-expected"&gt;Growth Creates Complexity Faster Than Expected&lt;/h2&gt;
&lt;p&gt;Most companies do not struggle because they lack data. More often, the real challenge is that &lt;strong&gt;data slowly becomes scattered&lt;/strong&gt; across too many platforms and tools.
What starts as a handful of Excel files and internal reports gradually turns into a mix of disconnected systems, PDFs, emails, cloud storage, legacy software, and manual workflows.
At first, the collection of systems feels manageable, but as data grows and software stacks evolve, &lt;strong&gt;temporary solutions&lt;/strong&gt; and &lt;strong&gt;workarounds&lt;/strong&gt; risk becoming permanent processes.&lt;/p&gt;
&lt;p&gt;Fragmented data management systems and processes are common among small and medium businesses that grow quickly or companies that expand through acquisitions.
The problem appears across many industries.
In &lt;strong&gt;healthcare&lt;/strong&gt;, practitioners contend with patient records that are often spread across multiple systems subject to strict compliance requirements.
&lt;strong&gt;Retail and e-commerce&lt;/strong&gt; companies struggle to synchronize inventory, sales, and customer data across platforms.
&lt;strong&gt;Manufacturing businesses&lt;/strong&gt; generate large amounts of machine and production data—most of which is trapped in isolated silos—while &lt;strong&gt;financial organizations&lt;/strong&gt; rely on consistent reporting pipelines for risk management, fraud detection, and compliance monitoring.
For very different sectors, the underlying issue is the same: &lt;strong&gt;fragmented and inconsistent data&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="turn-fragmented-data-into-a-reliable-foundation"&gt;Turn Fragmented Data into a Reliable Foundation&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Data fragmentation&lt;/strong&gt; is underestimated because the problems rarely appear all at once.
However, over time, they begin to create friction across the entire organization.
As a result, teams spend hours overcoming data issues and, consequently, product development slows down because information cannot be trusted quickly enough to support decision-making.&lt;/p&gt;
&lt;p&gt;In the face of overwhelming data problems, companies may be inclined to implement advanced analytics or AI infrastructure. However, such tools can only deliver value after creating a &lt;strong&gt;well-structured data foundation&lt;/strong&gt;.
The construction of such a foundation begins with understanding where the data comes from, how reliable it is, and how different systems interact with one another.
From there, businesses can begin replacing manual processes with &lt;strong&gt;automated workflows&lt;/strong&gt; that collect, clean, and organize information consistently across the organization.
This includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Integrating disconnected tools and databases&lt;/li&gt;
&lt;li&gt;Automating Extract, Transform, Load (ETL) workflows&lt;/li&gt;
&lt;li&gt;Cleaning duplicate, outdated, or incomplete records&lt;/li&gt;
&lt;li&gt;Standardizing KPIs and reporting logic across departments&lt;/li&gt;
&lt;li&gt;Centralizing data storage through a scalable cloud infrastructure&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The goal is not to add unnecessary complexity, but to &lt;strong&gt;create a system where teams can finally trust the information they work with every day&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="data-collection-to-useful-information-in-manufacturing"&gt;Data Collection to Useful Information in Manufacturing&lt;/h2&gt;
&lt;p&gt;Every sector can suffer from data fragmentation.
Each must create its own pipelines to handle the data it collects and to transform it into a useful form.
In order to give a practical example in this short blog
article, we will focus on &lt;strong&gt;manufacturing&lt;/strong&gt;, where a plethora
of data can be collected throughout the industrial process.&lt;/p&gt;
&lt;p&gt;Collecting raw data is only the first step in gaining useful insights from the production floor.&lt;br&gt;
To make it useful, the &lt;strong&gt;collected data needs to be validated and harmonized&lt;/strong&gt;.
Sensor readings may use different sampling rates, units, or timestamps, and need to be linked to the corresponding machinery component or production batch.
At the same time, quality-control cameras capture images of manufactured components, while operators and technicians record maintenance activities and service reports.
&lt;strong&gt;Automated data pipelines&lt;/strong&gt; transform the measurements into a consistent format and integrate different sources of information before storing them for effective use.&lt;/p&gt;
&lt;p&gt;These measurements can be automatically transmitted through &lt;strong&gt;IIoT communication protocols&lt;/strong&gt; such as &lt;strong&gt;OPC UA&lt;/strong&gt; or &lt;strong&gt;MQTT&lt;/strong&gt; to edge devices or gateways located close to the production line.
The edge layer performs initial processing tasks, including filtering noisy signals, synchronizing timestamps, validating sensor readings, and attaching contextual information such as machine identifiers or production batches.
The processed data is then streamed to centralized time-series databases, creating a &lt;strong&gt;consistent historical record&lt;/strong&gt; of machine behavior without relying on manual measurements or spreadsheets.&lt;/p&gt;
&lt;p&gt;This infrastructure does not necessarily have to be built entirely from scratch.
&lt;strong&gt;Cloud platforms&lt;/strong&gt; such as Microsoft Azure and Google Cloud provide standard services for connecting industrial devices, ingesting and processing telemetry, storing manufacturing data, and building analytics.
The challenge is often choosing and combining the right components for the specific production environment rather than developing every part internally.&lt;/p&gt;
&lt;p&gt;In a manufacturing environment, building a reliable data foundation starts with &lt;strong&gt;automating the collection and processing of data&lt;/strong&gt; generated throughout the production process.
From there, that data can be used for a whole host of purposes.
In the &lt;a href="https://www.koehn.ai/en/blog/upgrades_and_retrofitting/"&gt;companion blog article&lt;/a&gt;, we will examine exactly what a consistent database and advanced pipelines enable for manufacturers and consumers.&lt;/p&gt;
&lt;h2 id="making-your-data-infrastructure-ai-ready"&gt;Making Your Data Infrastructure AI-Ready&lt;/h2&gt;
&lt;p&gt;Today, many organizations are investing in &lt;strong&gt;AI solutions&lt;/strong&gt;, predictive analytics, and automation.
But even the most advanced AI systems cannot compensate for fragmented or poor-quality data.
If data sources contain duplicate records, conflicting entries, or incomplete historical records, the outputs generated by AI models will also become unreliable.
In practice, &lt;strong&gt;bad data does not disappear with AI; it just propagates model bias at scale&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;At Koehn AI, we help organizations &lt;strong&gt;turn existing data and systems into a reliable foundation for AI&lt;/strong&gt;.
This often means looking beyond the obvious solution: for example, understanding an old machine in detail before deciding what to measure and how to retrofit it.
We bring the &lt;strong&gt;scientific expertise&lt;/strong&gt; that helps understand the underlying system first and develop the right solution around it.&lt;/p&gt;
&lt;p&gt;The same approach applies to unstructured information such as maintenance reports and technical documentation.
With modern AI approaches such as &lt;strong&gt;Large Language Models&lt;/strong&gt; (LLMs) and &lt;strong&gt;Retrieval-Augmented Generation&lt;/strong&gt; (RAG), we turn this otherwise difficult-to-use knowledge into information that can be searched and used more effectively.&lt;/p&gt;
&lt;p&gt;Ultimately, the goal is not simply to introduce AI, but to &lt;strong&gt;build&lt;/strong&gt; the &lt;strong&gt;data foundation&lt;/strong&gt; that allows it to deliver real value.&lt;/p&gt;</description></item><item><title>AI-driven drug discovery with transformer models</title><link>https://www.koehn.ai/en/blog/cofolding/</link><pubDate>Wed, 18 Mar 2026 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/cofolding/</guid><description>&lt;h2 id="the-lock-and-key-challenge"&gt;The &amp;ldquo;Lock and Key&amp;rdquo; Challenge&lt;/h2&gt;
&lt;p&gt;Drug discovery is costly and time-consuming; worldwide pharmaceutical R&amp;amp;D spending reached an estimated &lt;a href="https://makingpharmaindustry.it/wp-content/uploads/2025/03/iqvia-institute-rd-trends-2025-forweb.pdf" target="_blank" rel="noopener"&gt;USD 190 billion in 2024&lt;/a&gt;, with development times for new drugs typically ranging from 10 to 15 years.&lt;/p&gt;
&lt;p&gt;Developing drugs that interact with a specific target involved in a disease, such as an enzyme or receptor, is a process of designing, screening, and refining molecules to bind to that target. We can imagine the challenge for researchers as being like designing a key for a lock, but where both the key and the lock are constantly wiggling and changing shape. Furthermore, the key may often have to hold two or more locks together simultaneously. This is known as a ternary complex.&lt;/p&gt;
&lt;p&gt;Take the example of &lt;a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC10525103/" target="_blank" rel="noopener"&gt;Rapamycin&lt;/a&gt;, a small molecule drug originally discovered in a soil sample from Easter Island, produced by the &lt;a href="https://pubmed.ncbi.nlm.nih.gov/1102508/" target="_blank" rel="noopener"&gt;bacterium &lt;em&gt;Streptomyces hygroscopicus&lt;/em&gt;&lt;/a&gt;. It is used as an immunosuppressant to prevent organ transplant rejection and as a treatment for cancers such as renal cell carcinoma. Intriguingly, Rapamycin is also known to &lt;a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC2786175/" target="_blank" rel="noopener"&gt;extend lifespans in mice&lt;/a&gt; and has generated great interest for its potential to &lt;a href="https://www.thelancet.com/journals/lanhl/article/PIIS2666-7568%2823%2900258-1/fulltext" target="_blank" rel="noopener"&gt;extend human longevity&lt;/a&gt;. Rapamycin acts as a molecular glue between a large kinase protein called the &lt;a href="https://www.cell.com/cell-metabolism/fulltext/S1550-4131%2816%2930227-3" target="_blank" rel="noopener"&gt;mechanistic Target of Rapamycin (mTOR)&lt;/a&gt;, often referred to as the cell&amp;rsquo;s &amp;ldquo;growth switch&amp;rdquo;, and FKBP12, which is involved in the human immune response.&lt;/p&gt;
&lt;h2 id="beyond-alphafold-open-source-drug-discovery-with-boltz-2"&gt;Beyond AlphaFold: Open-Source Drug Discovery with Boltz-2&lt;/h2&gt;
&lt;p&gt;Running an experiment to determine the interaction between a drug candidate and a target protein, or a ternary protein complex, can take weeks or months and cost thousands of dollars. With the latest advances in transformer-based foundational models like &lt;a href="https://github.com/google-deepmind/alphafold3" target="_blank" rel="noopener"&gt;AlphaFold 3&lt;/a&gt; and &lt;a href="https://github.com/jwohlwend/boltz" target="_blank" rel="noopener"&gt;Boltz-2&lt;/a&gt;, these interactions can be predicted in seconds, with thousands of drug candidates screened in parallel using this &lt;em&gt;in silico&lt;/em&gt; approach.&lt;/p&gt;
&lt;p&gt;While the license for AlphaFold 3 is restrictive for commercial use, Boltz-2 is open source and licensed under the highly permissive MIT license. This allows clients to run their drug pipelines on their own private infrastructure, protecting valuable intellectual property. This ensures data sovereignty, guaranteeing that proprietary lead compounds and intellectual property never leave your private infrastructure.&lt;/p&gt;
&lt;p&gt;Boltz-2 uses a deep learning approach called co-folding to simulate how multiple proteins interact with a drug candidate. It is particularly useful for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hit discovery: Rapidly triaging large chemical libraries to effectively distinguish potential &amp;lsquo;binders&amp;rsquo; from &amp;lsquo;decoys&amp;rsquo; during high-throughput screening.&lt;/li&gt;
&lt;li&gt;Lead optimization: The affinity head allows researchers to rank close analogs and predict how small molecular modifications will impact potency.&lt;/li&gt;
&lt;li&gt;Difficult pockets: Simulating the flexible shapes of ligands and targets simultaneously.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Boltz-2 architecture integrates many recent advances in machine learning, such as a diffusion/denoising module, similar to Midjourney or DALL-E, but for atoms instead of pixels. Additionally, the Affinity module, a special regression head, &amp;lsquo;stress tests&amp;rsquo; the interaction prediction to provide a binding affinity score. Furthermore, inference-time steering sets physics-based guardrails on the simulation.&lt;/p&gt;
&lt;h2 id="simulating-a-molecular-glue"&gt;Simulating a Molecular &amp;ldquo;Glue&amp;rdquo;&lt;/h2&gt;
&lt;p&gt;Returning to our example of Rapamycin, we can see the output of Boltz-2 for simulating the ternary complex of the FRB domain of mTOR, Rapamycin, and FKBP12. This visualizes how Rapamycin &amp;lsquo;glues&amp;rsquo; these two proteins together, affecting both of their functions. With the viewer, we can rotate and zoom in on the predicted interaction in three dimensions. Rapamycin doesn’t just find a pocket in the mTOR complex; it stabilizes the interaction between the protein and FKBP12.&lt;/p&gt;
&lt;p&gt;Here, we have predicted the ternary structure with Boltz-2 using the CLI, with sequences from &lt;a href="https://pubmed.ncbi.nlm.nih.gov/10089303/" target="_blank" rel="noopener"&gt;an early experimentally derived structure published in 1999&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After &lt;a href="https://github.com/jwohlwend/boltz?tab=readme-ov-file#installation" target="_blank" rel="noopener"&gt;installing our Boltz-2 environment&lt;/a&gt;, we generate a YAML file for our experiment:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# rapamycin.yaml&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;sequences&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;protein&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;A &lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# mTOR FRB Domain&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sequence&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;VAILWHEMWHEGLEEASRLYFGERNVKGMFEVLEPLHAMMERGPQTLKETSFNQAYGRDLMEAQEWCRKYMKSGNVKDLTQAWDLYYHVFRRIS&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;protein&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;B &lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# FKBP12&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sequence&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;GVQVETISPGDGRTFPKRGQTCVVHYTGMLEDGKKFDSSRDRNKPFKFMLGKQEVIRGWEEGVAQMSVGQRAKLTISPDYAYGATGHPGIIPPHATLVFDVELLKLE&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;ligand&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;C &lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Rapamycin&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;smiles&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;C[C@@H]1CC[C@H]2C[C@@H](/C(=C/C=C/C=C\[C@H](C[C@H](C(=O)[C@@H]([C@@H](/C(=C/[C@H](C(=O)C[C@H](OC(=O)[C@@H]3CCCCN3C(=O)C(=O)[C@@]1(O2)O)[C@H](C)C[C@@H]4CC[C@H]([C@@H](C4)OC)O)C)/C)O)OC)C)C)/C)OC&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;affinity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;binder&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;C&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After creating our YAML file, we use the Boltz CLI to generate the prediction:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;boltz predict rapamycin.yaml --use_msa_server
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The structure representation is interactive; you can rotate and zoom to explore the predicted structure and compare it to the &lt;a href="https://www.rcsb.org/3d-view/1NSG/1" target="_blank" rel="noopener"&gt;published X-ray crystallography structure&lt;/a&gt;.&lt;/p&gt;
&lt;script src="https://3dmol.org/build/3Dmol-min.js"&gt;&lt;/script&gt;
&lt;style&gt;
.mol-container-ternary-ternary { margin: 30px 0; clear: both; }
.mol-canvas-ternary-ternary {
width: 100%; height: 600px; border: 1px solid #ddd;
border-radius: 12px; background-color: white;
position: relative !important; overflow: hidden;
}
.mol-controls-ternary-ternary { margin-bottom: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.mol-btn-ternary-ternary {
padding: 8px 16px;
border: 2px solid #ddd;
background: #f9f9f9;
color: #666;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
font-weight: 500;
}
#toggleA-ternary-ternary.active {
border-color: #E55E26;
background-color: #fff2ed;
color: #b33d0d;
}
#toggleB-ternary-ternary.active {
border-color: #00916F;
background-color: #ebfaf7;
color: #006b52;
}
#toggleL-ternary-ternary.active {
border-color: #4CAF50;
background-color: #f1f9f1;
color: #2e7d32;
}
#reset-ternary-ternary { border-color: #ccc; background: white; color: #333; }
#reset-ternary-ternary:hover { background: #eee; }
.mol-btn-ternary-ternary:hover { filter: brightness(0.95); }
&lt;/style&gt;
&lt;div class="mol-container-ternary-ternary"&gt;
&lt;div class="mol-controls-ternary-ternary"&gt;
&lt;button id="toggleA-ternary-ternary" class="mol-btn-ternary-ternary active" &gt;mTOR FRB&lt;/button&gt;
&lt;button id="toggleB-ternary-ternary" class="mol-btn-ternary-ternary active" &gt;FKBP12&lt;/button&gt;
&lt;button id="toggleL-ternary-ternary" class="mol-btn-ternary-ternary active" &gt;Rapamycin&lt;/button&gt;
&lt;button id="reset-ternary-ternary" class="mol-btn-ternary-ternary"&gt;Reset View&lt;/button&gt;
&lt;/div&gt;
&lt;div id="viewer-ternary-ternary" class="mol-canvas-ternary-ternary"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;script&gt;
(function() {
let v = null;
const state = { A: true, B: true, L: true };
const init = () =&gt; {
const element = document.getElementById("viewer-ternary-ternary");
v = $3Dmol.createViewer(element, { backgroundColor: "white" });
const applyStyles = () =&gt; {
v.setStyle({}, {});
if (state.A) v.setStyle({ chain: "A" }, { cartoon: { color: "#E55E26" } });
if (state.B) v.setStyle({ chain: "B" }, { cartoon: { color: "#00916F" } });
if (state.L) v.setStyle({ resn: "LIG1" }, { stick: { colorscheme: "greenCarbon", radius: 0.22 } });
v.render();
document.getElementById("toggleA-ternary-ternary").classList.toggle("active", state.A);
document.getElementById("toggleB-ternary-ternary").classList.toggle("active", state.B);
document.getElementById("toggleL-ternary-ternary").classList.toggle("active", state.L);
};
document.getElementById("toggleA-ternary-ternary").onclick = () =&gt; { state.A = !state.A; applyStyles(); };
document.getElementById("toggleB-ternary-ternary").onclick = () =&gt; { state.B = !state.B; applyStyles(); };
document.getElementById("toggleL-ternary-ternary").onclick = () =&gt; { state.L = !state.L; applyStyles(); };
document.getElementById("reset-ternary-ternary").onclick = () =&gt; { v.zoomTo(); v.render(); };
fetch("\/media\/blog\/cofolding-model.cif")
.then(r =&gt; r.text())
.then(data =&gt; {
v.addModel(data, "cif");
applyStyles();
v.zoomTo();
v.render();
});
};
const checkLib = setInterval(() =&gt; {
if (typeof $3Dmol !== 'undefined') {
clearInterval(checkLib);
init();
}
}, 100);
})();
&lt;/script&gt;
&lt;h2 id="benchmarking-affinity-with-boltz-2"&gt;Benchmarking Affinity with Boltz-2&lt;/h2&gt;
&lt;p&gt;We know that the interaction of Rapamycin within this ternary structure is &lt;a href="https://pubmed.ncbi.nlm.nih.gov/9933627/" target="_blank" rel="noopener"&gt;mediated by the FKBP12 protein&lt;/a&gt;, but can we verify this by simulating different combinations using Boltz-2? This represents a common use case where researchers probe cooperative binding in various contexts.&lt;/p&gt;
&lt;p&gt;To scale this, we can use a batch process to programmatically call the Boltz CLI. Our workflow follows these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Generation: Programmatically use FASTA protein sequences to generate YAML configuration files for each experimental condition.&lt;/li&gt;
&lt;li&gt;Execution: Point the Boltz predictor to the input directory containing our generated YAMLs.&lt;/li&gt;
&lt;li&gt;Processing: Iterate through the results to compare the affinity binding scores across different protein combinations&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After generating the different combinations of the YAML configuration files, we can programmatically call Boltz on the experiments and run the process.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-Python" data-lang="Python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;subprocess&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;run_boltz&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input_dir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output_dir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;use_msa_server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;cmd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;boltz&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;predict&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;input_dir&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;--out_dir&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output_dir&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;use_msa_server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;--use_msa_server&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;run_boltz&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;inputs&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;outputs&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;use_msa_server&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For this experiment, we performed five simulations for each combination to ensure statistical robustness. Why five? Structural predictions can vary slightly between runs but by averaging multiple seeds, we obtain a more reliable mean affinity score and can measure the variance.&lt;/p&gt;
&lt;p&gt;It is important to note that a lower score is better, as the affinity prediction value represents the log10 of the half-maximal inhibitory concentration (IC50). A lower IC50 indicates a more potent binding interaction.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="result"
srcset="https://www.koehn.ai/media/blog/cofolding-affinity_hu_ca9adbaee2df30c4.webp 320w, https://www.koehn.ai/media/blog/cofolding-affinity_hu_b0f632d381f7ad0e.webp 480w, https://www.koehn.ai/media/blog/cofolding-affinity_hu_f2e8cee7295e12fa.webp 558w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/cofolding-affinity_hu_ca9adbaee2df30c4.webp"
width="558"
height="378"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The simulation results clearly demonstrate the cooperative nature of the system. While Rapamycin shows affinity for both FKBP12 (-1.67) and the FRB domain (-1.43) individually, the ternary complex (-2.01) shows the highest predicted affinity. This significantly lower score confirms that the small molecule effectively stabilizes the interaction between the two proteins, acting as a potent molecular glue.&lt;/p&gt;
&lt;h2 id="accelerating-your-drug-discovery-pipeline"&gt;Accelerating Your Drug Discovery Pipeline&lt;/h2&gt;
&lt;p&gt;While models like Boltz-2 provide groundbreaking predictive power, there is often a significant gap between running a CLI tool on a research workstation and deploying a scalable, reliable drug discovery pipeline. A foundation model can provide the raw data, but the true value lies in how this data is integrated into a larger R&amp;amp;D workflow.&lt;/p&gt;
&lt;p&gt;At Koehn AI we specialize in bridging the divide between cutting-edge science and robust software engineering. Whether you are looking to wrap these models in high-performance API endpoints, automate complex batch-processing workflows, or build intuitive 3D visualization tools for your researchers, we help you deploy AI that works in production.&lt;/p&gt;
&lt;p&gt;Ready to accelerate your drug discovery pipeline? &lt;a href="https://www.koehn.ai/en/contact/" target="_blank" rel="noopener"&gt;Contact us&lt;/a&gt; to discuss how we can help you build the infrastructure for the next generation of molecular science.&lt;/p&gt;</description></item><item><title>Causal Impact: Analyzing the impact of events</title><link>https://www.koehn.ai/en/blog/causal-impact-analyzing-impact-events/</link><pubDate>Tue, 07 Feb 2023 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/causal-impact-analyzing-impact-events/</guid><description>&lt;h2 id="actio-et-reactio"&gt;Actio et Reactio&lt;/h2&gt;
&lt;p&gt;As the Earth keeps on turning and all of us keep on pursuing our daily work and life, things will continue to change and changes cause further reaching effects. Understanding the effects of specific impacts is essential for business success. If you saw increasing material prices after an extreme weather event, e.g., you may want to quantify this to better prepare for similar upcoming events. When you change the advertising strategies for your company, you want to measure the extra profit gained via these efforts.&lt;/p&gt;
&lt;h2 id="causal-impact"&gt;Causal Impact&lt;/h2&gt;
&lt;p&gt;With Google’s
&lt;strong&gt;Causal Impact&lt;/strong&gt; package (tfcausalimpact for Python), there is an easily applicable tool to do this. We will illustrate how it works, but also where you have to be careful.
As an exemplary dataset, we use the development of the real wages index of Germany, published quarterly [1]:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Fig. 1: Time curve of the real wages index, nominal wages index and the consumers&amp;rsquo; price index."
srcset="https://www.koehn.ai/media/blog/1-timecurve_hu_6421412e6ff38c45.webp 320w, https://www.koehn.ai/media/blog/1-timecurve_hu_1b6d07458fe43149.webp 480w, https://www.koehn.ai/media/blog/1-timecurve_hu_edc1cc4466a80ed1.webp 747w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/1-timecurve_hu_6421412e6ff38c45.webp"
width="747"
height="376"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Fig. 1: Time curve of the real wages index, nominal wages index and the consumers&amp;rsquo; price index.
The real wages index (black line, “Reallohnindex”) is mainly described by the nominal wages index (orange line, “Nominallohnindex”) and the consumers’ price index (blue line, “Verbraucherpreisindex”). We directly see that the curves behave quite differently from 2020 onwards, compared to the more steady behaviour pre-COVID. Note that this article is not supposed to be an analysis or even a critique of COVID politics. It illustrates an analysis about the effect the measures had – and it is of course far from obvious how the effect would have been had other measures been chosen instead.&lt;/p&gt;
&lt;h2 id="causal-impact-on-the-data-itself"&gt;Causal Impact on the Data Itself&lt;/h2&gt;
&lt;p&gt;Running the Causal Impact framework on a dataset, we only have to tell the algorithm when the impact happened and whether to use additional inputs next to the actual target column. While it offers more ways to customise the analysis, we may only use the target (i.e. the real wages index) for a first run and set the impact on the first quarter of 2020:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Fig. 2: Causal Impact result of run on real wages index only."
srcset="https://www.koehn.ai/media/blog/2-causalimpact_hu_3dc1945676b9f06c.webp 320w, https://www.koehn.ai/media/blog/2-causalimpact_hu_db08439be1db354f.webp 480w, https://www.koehn.ai/media/blog/2-causalimpact_hu_4eb14b0a8083cde0.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/2-causalimpact_hu_3dc1945676b9f06c.webp"
width="760"
height="545"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Fig. 2: Causal Impact result of run on real wages index only.
Let us use this plot to explain the working principle of Causal Impact [2]. Based on the data before the impact, Causal Impact fits a Bayesian structural time-series model and uses it to predict how the target value (black curve, labelled “y”) would be expected to continue had the impact not happened. This is the so-called counterfactual: If this prediction suffices to explain the behaviour post-impact, there may have well been no impact after all. In the plot above, this is the orange band, with average predictions as the dashed red line. The broader the band, the more uncertainty lies behind the predictions. As we have not provided any further information, the uncertainty is rather large in the above first run. Still, the results make it clear that the provided impact did indeed happen: The second and third plot show the effect of the impact, pointwise and cumulative, i.e. how much the true values exceed the predictions.&lt;/p&gt;
&lt;h2 id="causal-impact-with-covariates--how-not-to-do-it"&gt;Causal Impact with Covariates – How Not to Do it&lt;/h2&gt;
&lt;p&gt;We already stated that we can also include additional data in the analysis, so-called control time series or covariates. Their purpose is to improve the predictability of the target, but they should not be affected by the impact themselves. This is a very important requirement. If the provided control time series are indeed also influenced by the impact event, the Causal Impact algorithm can no longer reliably quantify the effect of the impact – or even whether there was one in the first place.
We can illustrate this by doing what we shouldn’t: we add the nominal wages index as a control time series, which is a valuable input for determining the real wages index but also clearly experiences the impact itself (confer Fig. 1). The results then look like this:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Fig. 3: Causal Impact result on run with nominal wages index as control time series."
srcset="https://www.koehn.ai/media/blog/3-causalimpact_hu_19551734ff632485.webp 320w, https://www.koehn.ai/media/blog/3-causalimpact_hu_1d2f95ab5b2556ff.webp 480w, https://www.koehn.ai/media/blog/3-causalimpact_hu_ed8da3933be8e930.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/3-causalimpact_hu_19551734ff632485.webp"
width="760"
height="548"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Fig. 3: Causal Impact result on run with nominal wages index as control time series.
First of all, we see that the orange band is much narrower, even following the trend of the true values. For the pre-impact era, this is very much desirable. However, the nominal wages index is not a suitable control time series and this is reflected by the post-impact predictions continuing to follow the true values. As a result, the second and third plots show much less effect of an impact: the amount is smaller and the abscissa (i.e. no effect after all) lies within the uncertainty of the predicted effect. Adding also the consumers’ price index, we even get a symmetric uncertainty band, implying that the model can not quantify the effect of the impact:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Fig. 4: Causal Impact result on run with nominal wages index and consumers&amp;rsquo; price index as control time series."
srcset="https://www.koehn.ai/media/blog/4-causalimpact_hu_97fba7c2a8c18866.webp 320w, https://www.koehn.ai/media/blog/4-causalimpact_hu_e2dc30c14278ff2d.webp 480w, https://www.koehn.ai/media/blog/4-causalimpact_hu_3ad9f75340d6e4e7.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/4-causalimpact_hu_97fba7c2a8c18866.webp"
width="760"
height="545"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Fig. 4: Causal Impact result on run with nominal wages index and consumers&amp;rsquo; price index as control time series.
To extract more quantitative results, Causal Impact offers the summary functionality. For the first run, this returns:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Tab. 1: Results of the summary function of Causal Impact."
srcset="https://www.koehn.ai/media/blog/4a-summary_hu_c6212fd197f56dbb.webp 320w, https://www.koehn.ai/media/blog/4a-summary_hu_69597887146651d6.webp 480w, https://www.koehn.ai/media/blog/4a-summary_hu_26ae28cf79619aee.webp 501w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/4a-summary_hu_c6212fd197f56dbb.webp"
width="501"
height="358"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
The last lines tell whether Causal Impact can confirm the impact and the table quantifies the amount of the effect, stating the respective values with standard deviations (“s.d.”) and 95% confidence intervals (“CI”). In this case, Causal Impact is certain the impact did indeed happen and that it had a considerable effect. This already changes when we include the nominal wages index as control time series:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Tab. 2: Results of the summary function of Causal Impact including nominal wages."
srcset="https://www.koehn.ai/media/blog/4b-summary-nominalwages_hu_10e2a86ddf677dc6.webp 320w, https://www.koehn.ai/media/blog/4b-summary-nominalwages_hu_4b2f1325b8e4f621.webp 480w, https://www.koehn.ai/media/blog/4b-summary-nominalwages_hu_b14dc37df96fef4c.webp 501w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/4b-summary-nominalwages_hu_10e2a86ddf677dc6.webp"
width="501"
height="358"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
While Causal Impact still confirms the impact happened, the effect is considerably reduced (do not be confused by the large numbers for the relative effect: These are computed with respect to the predicted value, which is close to zero here.) Including now also the consumers’ price index as control time series, Causal Impact no longer confirms the impact happened and, consequently, the effect is expected to be vanishing.
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Tab. 3: Results of the summary function of Causal Impact including price index."
srcset="https://www.koehn.ai/media/blog/4c-summary-price-index_hu_929fbead3506a86e.webp 320w, https://www.koehn.ai/media/blog/4c-summary-price-index_hu_1ca2dba56f7bb67b.webp 480w, https://www.koehn.ai/media/blog/4c-summary-price-index_hu_d26f8e67ae6be48d.webp 501w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/4c-summary-price-index_hu_929fbead3506a86e.webp"
width="501"
height="358"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Another requirement for the control time series is that it must have data also before the impact. In the above example, you may of course think that the effect is larger when there were more strict COVID measures (or with some time delay). Comparing the stringency index [3] with the real wages index, we find:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Fig. 5: real wages, net income and consumers’ price index vs. stringency level of COVID measures (min, max, mean per quarter)."
srcset="https://www.koehn.ai/media/blog/5-realwages_hu_d00a1570095c23db.webp 320w, https://www.koehn.ai/media/blog/5-realwages_hu_b7a97aa696f483c4.webp 480w, https://www.koehn.ai/media/blog/5-realwages_hu_6f75849e1c61e38b.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/5-realwages_hu_d00a1570095c23db.webp"
width="760"
height="380"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Fig. 5: real wages, net income and consumers’ price index vs. stringency level of COVID measures (min, max, mean per quarter).
However, using the stringency level of the COVID measures as control time series, Causal Impact can not extract any information from it as the measures did not exist pre-impact. What is more, if the data is precisely 0 in the whole of the pre-impact era, we run into division by 0 errors. This can be circumvented by replacing the zeroes by small random values, but then – as one can expect – the predictions blow up as the stringency value increases to the actual values:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Fig. 6: Causal Impact result on run with the stringency level of the COVID measures as control time series."
srcset="https://www.koehn.ai/media/blog/6-causalimpact_hu_e0b5261f5398bea6.webp 320w, https://www.koehn.ai/media/blog/6-causalimpact_hu_489077ed57a0b0f0.webp 480w, https://www.koehn.ai/media/blog/6-causalimpact_hu_566f5a4ffbb291f2.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/6-causalimpact_hu_e0b5261f5398bea6.webp"
width="760"
height="531"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Fig. 6: Causal Impact result on run with the stringency level of the COVID measures as control time series.
The fact that Causal Impact could not gain any information from the stringency level data is also reflected by the symmetric shape of the prediction band: It could not even deduce whether an increase in the stringency level translates to an in- or decrease in the target value.&lt;/p&gt;
&lt;h2 id="ci-with-covariates--how-to-do-it"&gt;CI with Covariates – How to Do it&lt;/h2&gt;
&lt;p&gt;We illustrated two reasons that make a control time series meaningless as such. So what could be a useful covariate in this case? Clearly, it should be one that is linked to the data of interest, the real wages index, but did not experience the impact. In the example of marketing, the data of interest could be a market where you changed your marketing strategy, while the covariates are markets without changes.
It’s not easy to find a similarly good example in the case of COVID, as it impacted pretty much all aspects of life. However, looking at the net cold rent index (“Nettokaltmietindex”, where 100 reflects the level of 2015) [4], we find that it was rather unaffected – and it does make sense, too, as you can’t increase rent arbitrarily in Germany.
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Fig. 7: real wages, nominal wages and consumers&amp;rsquo; price index vs. net cold rent index."
srcset="https://www.koehn.ai/media/blog/7-realwages_hu_7f8ce2ac611e2a72.webp 320w, https://www.koehn.ai/media/blog/7-realwages_hu_8d9aa0ca8ddb5228.webp 480w, https://www.koehn.ai/media/blog/7-realwages_hu_cf0073b25c81892d.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/7-realwages_hu_7f8ce2ac611e2a72.webp"
width="760"
height="355"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Fig. 7: real wages, nominal wages and consumers&amp;rsquo; price index vs. net cold rent index.
Running Causal Impact on the real wages index with the net cold rent index as control time series results in:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Fig. 8: Causal Impact result on run with the net cold rent index as control time series."
srcset="https://www.koehn.ai/media/blog/8-causalimpact_hu_e58c08b42ffb1850.webp 320w, https://www.koehn.ai/media/blog/8-causalimpact_hu_5bf678252e47625.webp 480w, https://www.koehn.ai/media/blog/8-causalimpact_hu_cf4a6e3338c6fe5a.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/8-causalimpact_hu_e58c08b42ffb1850.webp"
width="760"
height="545"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Fig. 8: Causal Impact result on run with the net cold rent index as control time series.
We see that the net cold rent index helps increasing prediction accuracy at least a bit. This leads to a higher estimated effect of the impact, as can be seen also by the metrics:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Tab. 4: Summary of Causal Impact results."
srcset="https://www.koehn.ai/media/blog/8a-summary_hu_6c71d8f73160a096.webp 320w, https://www.koehn.ai/media/blog/8a-summary_hu_b768021a06d8bba3.webp 480w, https://www.koehn.ai/media/blog/8a-summary_hu_33dae132bb10c747.webp 501w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/8a-summary_hu_6c71d8f73160a096.webp"
width="501"
height="358"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Note that the smaller relative effect (compared to the run without any control time series) is due to the predictions being higher.
A short final note on the most important modification of the routine: Instead of running it with default parameters, it is possible to choose i.a. a different kind of method to find the Bayesian posterior, the so-called Hamiltonian Monte Carlo method, via model_args={&amp;lsquo;fit_method&amp;rsquo;: &amp;lsquo;hmc&amp;rsquo;}.
The default way relies on TensorFlow Probability’s Variational Inference, which has the advantage of a considerable speed-up: While hmc took 56s in the above example, the default variatonal inference took 19s. The benefit of hmc is, however, precision:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Fig. 9: Causal Impact result on run with the net cold rent index as control time series and using Hamiltonian Monte Carlo."
srcset="https://www.koehn.ai/media/blog/9-causalimpact_hu_8ffbbfec7e1f2738.webp 320w, https://www.koehn.ai/media/blog/9-causalimpact_hu_ec5b6032c9905772.webp 480w, https://www.koehn.ai/media/blog/9-causalimpact_hu_c89c2302788610f8.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/9-causalimpact_hu_8ffbbfec7e1f2738.webp"
width="760"
height="570"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Fig. 9: Causal Impact result on run with the net cold rent index as control time series and using Hamiltonian Monte Carlo.
The predictions gained again in accuracy and the estimated effect of the impact increased as well:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Tab. 5: Summary of Causal Impact results."
srcset="https://www.koehn.ai/media/blog/9a-summary_hu_16c3a493b9bbc345.webp 320w, https://www.koehn.ai/media/blog/9a-summary_hu_4a57b4ac409ea4a2.webp 480w, https://www.koehn.ai/media/blog/9a-summary_hu_334d74b891f73aa.webp 501w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/9a-summary_hu_16c3a493b9bbc345.webp"
width="501"
height="358"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
We hope these examples motivate why you should be careful when choosing your control time series. It is also advisable to run the algorithm several times to get a notion of how stable the results are. Lastly, please consider to run the algorithm on randomly chosen moments of impact that lie before the actual one. If Causal Impact does not provide you with further impacts, it is a good sign that your setup is adequate. Note that further impacts before the one that is examined reduce the quality of the predictions and therefore the reliability of all results altogether.
[1]
&lt;a href="https://www.destatis.de/DE/Presse/Pressemitteilungen/2022/03/PD22_127_62321.html" target="_blank" rel="noopener"&gt;https://www.destatis.de/DE/Presse/Pressemitteilungen/2022/03/PD22_127_62321.html&lt;/a&gt;
[2]
&lt;a href="https://research.google/pubs/pub41854/" target="_blank" rel="noopener"&gt;https://research.google/pubs/pub41854/&lt;/a&gt;
[3]
&lt;a href="https://github.com/owid/covid-19-data/tree/master/public/data" target="_blank" rel="noopener"&gt;https://github.com/owid/covid-19-data/tree/master/public/data&lt;/a&gt;
[4]
&lt;a href="https://www-genesis.destatis.de/genesis/online?sequenz=tabelleErgebnis&amp;amp;selectionname=61111-0021" target="_blank" rel="noopener"&gt;https://www-genesis.destatis.de/genesis/online?sequenz=tabelleErgebnis&amp;selectionname=61111-0021&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Explainable AI using Shapley Values</title><link>https://www.koehn.ai/en/blog/feature-analysis-shapley/</link><pubDate>Wed, 04 Jan 2023 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/feature-analysis-shapley/</guid><description>&lt;h2 id="shapley-values-for-feature-importance-analysis"&gt;Shapley values for feature-importance analysis&lt;/h2&gt;
&lt;p&gt;Any machine-learning task revolves around gaining insights from data. The machine-learning model receives data of reasonable quality as input. The model gets tuned on input features derived from the input data to produce output of desired quality levels. But not all input features are of equal importance for the model. Some matter very much, but others might only add noise and increase computational complexity without any gain. There also is business value in learning about the key drivers for an output KPI. The question is: how to perform this technically?
The only machine-learning models that bring this evaluation along for free are based on Decision Trees, and even in those cases, it is left unresolved whether an increase in feature value leads to an increase or a decrease in the target variable. In contrast, the concept of
&lt;strong&gt;Shapley values&lt;/strong&gt; allows not only to cover this shortcoming, it also allows to evaluate the feature importance of general types of machine-learning model beyond Decision Trees. In this approach, each feature is systematically
&lt;strong&gt;integrated out&lt;/strong&gt; in succession and replaced with suitable
&lt;strong&gt;background noise&lt;/strong&gt; to study its impact on the target.
The analysis of feature importance using Shapley values constitutes a
&lt;strong&gt;universal tool&lt;/strong&gt; that we have used in almost every project across a range of verticals. We have used this method in the retail sector to identify key drivers for conversion. We have also implemented Shapley values when we designed a tool for scientists which gives information on what to change about an experiment in order to optimize a certain outcome.
To set up the algorithm, the
&lt;strong&gt;SHAP&lt;/strong&gt; Python package may be used. However, this package is still in experimental state and you have to be careful about bugs appearing from one version to the next. Of course you can also implement the routine by hand. Whichever route you take, keep in mind that the learnings from your feature analysis are limited in their reliability by the quality of the machine-learning model you apply it to. If the prediction quality of the model is poor, then also the feature analysis won&amp;rsquo;t be of much value.&lt;/p&gt;
&lt;h2 id="interpretation-of-results"&gt;Interpretation of results&lt;/h2&gt;
&lt;p&gt;An exemplary evaluation is given in the figure below.
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="RNN"
srcset="https://www.koehn.ai/media/blog/feature-shap_hu_acbe2f078807129.webp 320w, https://www.koehn.ai/media/blog/feature-shap_hu_900134e2d206e395.webp 480w, https://www.koehn.ai/media/blog/feature-shap_hu_1cf11c7b1f52d38a.webp 651w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/feature-shap_hu_acbe2f078807129.webp"
width="651"
height="674"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
In this figure, the 25 most important features of the specific machine-learning model under scrutiny here are listed in descending order. At the same time, the figure shows whether a
&lt;strong&gt;high or low feature value&lt;/strong&gt; leads to an
&lt;strong&gt;increase or decrease in the target value&lt;/strong&gt; . If the Shapley value is positive (applies to all points to the right of the vertical line), the target value increases, while a negative Shapley value decreases the target value.
Feature 1 will serve as an example for illustration at this point, for the case of a
&lt;strong&gt;customer churn&lt;/strong&gt; model. Feature 1 shall indicate how many days ago a customer last interacted with the company studied. A low feature value indicates a recent interaction of the customer with the company, a high value indicates a longer inactivity. Since the red dots for the feature value are all to the left of the vertical line, a high feature value (longer inactivity) obviously lowers the probability of the customer to be &amp;ldquo;alive&amp;rdquo; (the target variable). Conversely, a low feature value (recent interaction) provides an increase in the probability for the customer to be alive. There can also be Boolean variables - for instance, customers who either are members of a loyalty program or not. The Shapley analysis will in this case confirm the expectation that loyalty program members have a reduced probability of churning.&lt;/p&gt;</description></item><item><title>Real-Time Object Detection using YOLO</title><link>https://www.koehn.ai/en/blog/object-detection-yolo/</link><pubDate>Mon, 04 Jul 2022 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/object-detection-yolo/</guid><description>&lt;p&gt;One of the most fascinating and rapidly advancing AI disciplines is automated object recognition. This term refers to the autonomously learned recognition and classification of objects in images or videos. Thanks to tremendous performance advances in GPU-accelerated computing, AI-based object recognition algorithms are already being used in real-world applications. Some of the most prominent application areas are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Autonomous driving or driving assistance systems&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Optical quality control, automated barcode recognition&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Support in medical imaging processes (CT, MRT)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Traffic-flow analysis or license-plate recognition&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Safety systems (e.g. persons in the track bed)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While the practical use of object recognition systems is still in its infancy, the potential of this technology is virtually unlimited.
The technical perspective comprises two different approaches, the single-stage and the two-stage processes.&lt;/p&gt;
&lt;h2 id="two-stage-process"&gt;Two-stage process&lt;/h2&gt;
&lt;p&gt;In the two-step methods developed first, regions of interest in the image are isolated in the first step and checked for the presence of objects in the second step using an ordinary classification model. A simple algorithm for generating image sections is given by e.g. the sliding-window algorithm, in which the image sections to be classified are generated using a moving window to scan the entire image. More advanced systems use artificial intelligence to isolate interesting image sections. However, regardless of the exact structure of the first stage, the second stage always requires multiple evaluations per image. As a result, these AI systems achieve high precision, but are of limited usability for real-time applications due to the computing time required for the evaluation. An established two-stage AI architecture is given by e.g. the Region Based Convolutional Neural Network (R-CNN), which is now used in the Fast R-CNN, Faster R-CNN and Granulated R-CNN stages.&lt;/p&gt;
&lt;h2 id="single-stage-process"&gt;Single-stage process&lt;/h2&gt;
&lt;p&gt;This contrasts with the single-stage methods developed later, in which the complete evaluation, i.e. object recognition, classification and output of a limiting object frame (bounding box), takes place in only one step with only one evaluation. One of the most successful AI architectures ever, YOLO (&amp;ldquo;You Only Look Once&amp;rdquo;), belongs to the class of one-step object-recognition systems and carries the property of one-step already in its name. Like no other architecture, YOLO paved the way for real-time analysis of (moving) images and thus became a standard algorithm for object-recognition tasks. These days, the YOLO AI architecture is available in the development stages YOLOv3, YOLOv4 up to YOLOR. Due to its popularity, the main features of this object recognition system will be discussed in the following.&lt;/p&gt;
&lt;h2 id="the-output-vector"&gt;The output vector&lt;/h2&gt;
&lt;p&gt;To understand how the YOLO architecture works, it is worthwhile to take a closer look at the output vector of the model or to construct the desired output vector (ground truth) for an example. For this purpose, let us consider the following example photo in which birds and rocks are to be detected:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="YOLO-Objekterkennung"
srcset="https://www.koehn.ai/media/blog/yolo_hu_e3c433fcebab208f.webp 320w, https://www.koehn.ai/media/blog/yolo_hu_aa2204a2c41db4e7.webp 480w, https://www.koehn.ai/media/blog/yolo_hu_c6c38997529c99.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/yolo_hu_e3c433fcebab208f.webp"
width="760"
height="507"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
For the moment, we focus on the seagull on the left and imagine there to be no other seagulls or rocks in the photo. The general form of the YOLO output vector for a model with two classes and at most one object per image is:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="YOLO-Ausgabevektor"
srcset="https://www.koehn.ai/media/blog/yolo-formula-1_hu_e114a323d54c2ff3.webp 320w, https://www.koehn.ai/media/blog/yolo-formula-1_hu_7fd7e9250c780771.webp 463w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/yolo-formula-1_hu_e114a323d54c2ff3.webp"
width="463"
height="61"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Here, p_c corresponds to the confidence level that an object is present in the predicted bounding box. b_x,b_y are the coordinates of the center of the bounding box. The quantities b_h,b_w denote the height and width of the bounding box, respectively. The last components of the vector denote the class labels. They provide information about whether the object is a bird or a rock. More precisely, c_bird or c_rock are conditional probabilities, i.e. given the condition that the bounding box contains an object, how likely is it that the object is a bird or rock, respectively. For the above example photo with only the left seagull, the corresponding ground truth vector is thus
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="YOLO-Ground-Truth-Vektor"
srcset="https://www.koehn.ai/media/blog/yolo-groundtruth_hu_e9341bb2b95b9c71.webp 320w, https://www.koehn.ai/media/blog/yolo-groundtruth_hu_670eea34279b5982.webp 370w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/yolo-groundtruth_hu_e9341bb2b95b9c71.webp"
width="370"
height="58"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
with corresponding numerical values for the coordinates and dimensions of the bounding box.
The image displayed above contains not one but several objects. Thus, a single seven-component vector is obviously not sufficient for description. YOLO solves this problem by rasterizing the image:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="YOLO-Objekterkennung-Raster"
srcset="https://www.koehn.ai/media/blog/yolo-raster_hu_de434629b051fb45.webp 320w, https://www.koehn.ai/media/blog/yolo-raster_hu_355c55f2dd7a6633.webp 480w, https://www.koehn.ai/media/blog/yolo-raster_hu_a089ef8d513af2ad.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/yolo-raster_hu_de434629b051fb45.webp"
width="760"
height="507"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Instead of using a single seven-component vector, the above example uses a 6x9 array of seven-component vectors, one vector for each cell. Responsible for recognition, classification and bounding of an object is in each case the cell in which the center of the object lies. The bounding box can, of course, extend beyond the cell itself. In actual practice, the vector, which is seven-component in our example, is multiplied again so that several objects can be detected in the same cell. In order to keep this blog article as comprehensible as possible, we will refrain from more detailed explanations at this point.&lt;/p&gt;
&lt;h2 id="the-network-architecture"&gt;The network architecture&lt;/h2&gt;
&lt;p&gt;With a dataset of images prepared as before, in which bounding boxes and class labels for these boxes have been manually added, the system can now be trained. The actual architecture consists of several groups of convolutional layers, followed by a smaller number of fully-connected layers [1].
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="CNN"
srcset="https://www.koehn.ai/media/blog/cnn_hu_5f347e6e6cf12c60.webp 320w, https://www.koehn.ai/media/blog/cnn_hu_78ad69f7f2c157c5.webp 480w, https://www.koehn.ai/media/blog/cnn_hu_cb273c5ffe3bf43.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/cnn_hu_5f347e6e6cf12c60.webp"
width="760"
height="317"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
where the output layer in this case has the dimension 6x9x7. For the initial training of the AI architecture, a large number of prepared images is required as well as a computer system/cluster with sufficient GPU power. Due to these circumstances, it often makes sense in practice to work with pre-trained systems that have already been trained on a large dataset and are freely available. If the desired class is not contained in the pre-trained model, it is often sufficient to modify the output layer of the system and re-train it with a few hundred examples of the new class. This approach also ensures the practical applicability of the technology on a smaller scale, since the labor-intensive step of data preparation is reduced to a minimum.
If a system trained in this way is applied to images not contained in the training set, it is not uncommon for the algorithm to output several bounding boxes with different probabilities per object. This can happen, for example, if an object extends over several cells.
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="YOLO-Bounding-Boxes"
srcset="https://www.koehn.ai/media/blog/yolo-anchoring_hu_d7ae0876745bb87f.webp 320w, https://www.koehn.ai/media/blog/yolo-anchoring_hu_d73b9c24cb63d0a2.webp 480w, https://www.koehn.ai/media/blog/yolo-anchoring_hu_2850dcfe72235f1.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/yolo-anchoring_hu_d7ae0876745bb87f.webp"
width="760"
height="507"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
A simple global non-maximum suppression is clearly out of the question, since in this operation only the object with the highest probability would survive. A non-maximum suppression must therefore be performed in the individual groups. But how to identify these groups algorithmically? The concept used for this purpose in YOLO is known as Intersection Over Union (IOU). This method divides the area of the average of two bounding boxes by that of the union:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Intersection-Over-Union"
src="https://www.koehn.ai/media/blog/IOU.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
By appropriately choosing a threshold value, this concept can be used to identify the individual groups that belong together and then determine the final bounding boxes and class probabilities via group-wise non-maximum suppression. As already mentioned, the forward path of the network has to be traversed only once per image, which makes the network suitable for almost all object detection tasks, especially real-time applications.
[1] &lt;a href="https://arxiv.org/abs/1506.02640" target="_blank" rel="noopener"&gt;https://arxiv.org/abs/1506.02640&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Recurrent neural networks for personalized customer journeys</title><link>https://www.koehn.ai/en/blog/recurrent-neural-networks-personalized-customer-journeys/</link><pubDate>Wed, 15 Jun 2022 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/recurrent-neural-networks-personalized-customer-journeys/</guid><description>&lt;h2 id="know-thy-customer-flog-thy-product"&gt;Know thy customer, flog thy product.&lt;/h2&gt;
&lt;p&gt;Machine learning for data-assisted customer relationship management is becoming an increasingly important topic in marketing and quality of service. For large companies with extensive product ranges, and millions of customers, a clear challenge is the delivery of personalized service. In response to this challenge, retailers are turning to machine-learning assisted tools to sift through transactions, customers histories, and other data in order to make better predictions about future consumer behavior from prior trends. For retailers that are able to effectively leverage the vast amounts of data at their fingertips, the potential upside is enormous.
Applications range from improved customer recommendations and targeted advertising, to fraud detection, real-time bidding for online ad-inventory, optimized newsletter send-out timing, and more accurate product demand predictions. On the other hand, without targeted assistance customers may miss products of interest, be turned off by frequent irrelevant advertising, or find it easier to seek products elsewhere. The aim of this article is to introduce you to a special kind of neural network known as a recurrent neural network, which may be of particular interest for your business. We can implement similar tools for you. Feel free to reach out.&lt;/p&gt;
&lt;h2 id="machine-learning-in-marketing-and-services"&gt;Machine-learning in marketing and services&lt;/h2&gt;
&lt;p&gt;The question many Retailers face is how to best make use of the data they have at their fingertips. Traditional approaches to machine learning rely on input that is of a fixed format, which allows fixed neural architecture to take advantage of the known, and constant size of the input data. The classic example is that of image recognition, in which input is always represented as an nxn grid of colored pixels, while the output corresponds to a finite list of target labels (i.e. numbers, or letters, or the names of animals). In contrast, commercial data is usually structured as a time series, with different customers having vastly different purchasing histories. The traditional approach to dealing with diverse consumer behaviors and purchasing channels, has been to rely on feature engineering that attempts to re-express large and amorphous input datasets in terms of a small number key parameters, which can then be fed into some fixed neural architecture. For instance, the complicated purchasing history of any customer can be re-parameterized in terms of so called &lt;em&gt;RFM data&lt;/em&gt; detailing the &lt;em&gt;recency&lt;/em&gt;, &lt;em&gt;frequency&lt;/em&gt;, and &lt;em&gt;monetary&lt;/em&gt; values of a full purchasing history. The benefit of feature engineering is its simplicity, and that it evolves naturally from the classical analysis of large commercial data-sets (RFM data, for instance, has been used for many years to calculate the &lt;strong&gt;CLV&lt;/strong&gt; or &lt;em&gt;customer lifetime value&lt;/em&gt; of customers). The downside, however, is that determining which finite set of features best captures the essence of consumer histories is a time-consuming and fiddly art which at its core involves throwing away input data. If not done prudently, this reduction risks incorrect or incomplete conclusions being drawn. It would be better to have complete access to the full richness of the data set. After all, isn’t that the promised benefit of machine learning over traditional approaches in the first place?
Because consumer histories are inherently sequential and of varying length, a natural approach to consider in place of feature engineering is that of recurrent neural networks (RNNs). RNNs are artificial neural networks that are specifically designed to deal with sequential data of varying lengths. RNNs use a fixed neural architecture, however this architecture is employed to analyze each element of a sequence of data in turn. At each step, output from the proceeding step is included along with the input, providing &lt;em&gt;contextual&lt;/em&gt; information for the calculation. For the engineers reading, the difference between RNNs and more traditional feed forward neural networks is analogous to the difference between open loop and closed loop control theory. The following schematic is helpful for understanding the idea:&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="RNN"
srcset="https://www.koehn.ai/media/blog/RNN_hu_c92cd6aee445121.webp 320w, https://www.koehn.ai/media/blog/RNN_hu_a660ace1375ba088.webp 480w, https://www.koehn.ai/media/blog/RNN_hu_86f0f44cd05c7a52.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/RNN_hu_c92cd6aee445121.webp"
width="760"
height="221"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The kinds of input sequences that you should be thinking of are things like English sentences or songs, where each element of the sequences is given by a word, or a note. A useful way of understanding a RNN is to think of it &lt;code&gt;unrolled’ and acting on each element of a sequence of data one step at a time. At each step in an input sequence, the network takes in two pieces of input: (i) External input (i.e. a word, a photo, a piece of music), and (ii) output &lt;/code&gt;memory’ from the proceeding step. In turn, the network produces two pieces of output at each moment in time: (i) some usable output (perhaps an image, or some word), and (ii) an output ‘memory’ to feed into the next iteration of the network. The specifics of the input and output, as well as the internal topology of the network will depend on the problem at hand. We will say a bit more about these shortly. For now, the key point is that the same network is employed at each step in the sequence, and sequences of arbitrary length are able to be considered, which allows RNNs to process arbitrarily long inputs, and also to produce arbitrarily long outputs.
While the key idea behind RNNs of feeding output back into the input may sound simple, in practice it is extremely powerful, and has achieved remarkable results in natural language processing, speech translation, and a range of other domains. A classic example is that of a time series, in which temporal context should be taken into consideration at each moment in time.
Take for instance the problem of determining the future or past trajectory of a thrown ball from a sequence of photos. From a single photo it would be very difficult (and perhaps even impossible) to determine in which direction the ball had initially been thrown or where it is headed. On the other hand, with two or more photos, and knowledge about which order they occurred in, it should be possible to piece together information about the trajectory of the ball over time. Or said another way, context allows one not only to know the position of the ball at a given point in time, but also its derivatives.&lt;/p&gt;
&lt;h2 id="how-rnns-function"&gt;How RNNs function&lt;/h2&gt;
&lt;p&gt;Before discussing potential business applications, let&amp;rsquo;s pull back the curtain just a little, to see how RNNs work. In order to properly motivate the neural architecture behind RNNs, it is helpful to first make mention of how RNNs are trained. As with any neural network, training is achieved by updating the internal weights of the network in order to minimize the error of a predicted output in comparison to that expected for a given input. For those completely unfamiliar with neural networks, you can think of one as a &lt;em&gt;black box&lt;/em&gt; that takes some input, and uses it to produce an output. The &lt;em&gt;weights&lt;/em&gt; determine exactly what function is performed by the network, and so &lt;em&gt;training&lt;/em&gt; a network adjusts how the black box performs.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="RNN Black Box"
srcset="https://www.koehn.ai/media/blog/blackbox_hu_b556b6318db034db.webp 320w, https://www.koehn.ai/media/blog/blackbox_hu_10df49c41b5948ea.webp 480w, https://www.koehn.ai/media/blog/blackbox_hu_5636ee787b31e2bc.webp 661w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/blackbox_hu_b556b6318db034db.webp"
width="661"
height="350"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;For a standard feed-forward neural network, this training process follows three key steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Feed some input into the network to calculate a predicted output.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Calculate the `error’ or difference from the expected output, as well as the derivatives of the error with respect to the network weights.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the derivatives of the error to adjust the network&amp;rsquo;s internal weights in order to minimize the error.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This training process, known as back propagation, is repeated many times and preferably with a large amount of training data, with the ultimate goal of developing a set of weights capable of producing highly accurate output predictions for any given set of input data. For RNNs, the analogous process is known as back propagation through time (BPTT), but conceptually it is very similar to regular back propagation, and can be understood by analyzing the &lt;em&gt;unraveled&lt;/em&gt; neural network applied to a sequence of input data (as in the very first figure above). Each step of the unrolled network can be viewed as a &lt;em&gt;hidden layer&lt;/em&gt; of a regular feed forward deep neural network, which consists of an identical copy of the network. In this way, the exact same training techniques (which at their core reduce to the repeated application of the chain rule for derivatives) used in feed forward networks can also be applied to RNNs. In short: errors are calculated at each step, and the weights are correspondingly updated.
From the brief description above, readers familiar with training deep neural networks may be anticipating some of the problems that arise when training RNNs. Deep neural networks often suffer from &lt;em&gt;gradient problems&lt;/em&gt;, in which the training algorithm is more efficient at training the last layers of a deep Neural network, and becomes increasingly less effective the deeper the network is. Intuitively, this effect has to do with the dependence that each layer of a network has on input from the proceeding layers and so one sees compounding effects as one proceeds through the layers. This can lead to derivatives in the back propagation calculation that either vanish or explode, resulting in slow and noisy learning. Because RNNs are designed to work on sequences of arbitrary length, when unraveled (as in the first figure above) they may be viewed as deep neural networks of arbitrary depth. The usual result is &lt;strong&gt;memory loss&lt;/strong&gt; in training. That is, as the training algorithm adjusts the weights of a network while working over a sequence of training data, it does a much better job towards the end of a sequence. RNNs therefore tend to naturally assign far more importance to the end of an input data sequence.
At its heart, the reason that vanilla RNNs are subject to gradient problems is that the output from each step in the unrolled network is only shared at the next step in the sequence, and so there is no direct connection between the start and the end of the sequence. An obvious solution would be to directly feed the input from each step in the calculation into every subsequent step, however this would drastically increase the number of connections and the complexity of the algorithm. A less invasive approach is to explicitly create a single long term memory state that is propagated through the network, and shared at each step in the sequence along with the usual short-term memory. This is the approach of ‘long short-term memory’ networks or LSTMs, which have been employed to great effect in circumventing the gradient problems of RNNs. At each step when analyzing a sequence of data, an LSTM receives the current long-term memory of the network, known as the ‘cell state’, in addition to the usual output from the previous point in the sequence, and the external input data for the current point in the sequence.
The key new idea in LSTMs is the &lt;strong&gt;cell state&lt;/strong&gt;, which provides contextual information about the data that has already been processed in a sequence. The beauty of LSTMs is that the network itself is trained to regulate the flow of information into and out of the cell. LSTMs are composed of three smaller neural networks known as the &lt;strong&gt;forget gate&lt;/strong&gt;, the &lt;strong&gt;input gate&lt;/strong&gt;, and the &lt;strong&gt;output gate&lt;/strong&gt;. These three gates can be understood schematically by the following diagram:&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="LSTM"
srcset="https://www.koehn.ai/media/blog/LSTM_hu_5fed096c0efed965.webp 320w, https://www.koehn.ai/media/blog/LSTM_hu_10f8afb3ff930764.webp 480w, https://www.koehn.ai/media/blog/LSTM_hu_2ffd3b9cf40736c8.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/LSTM_hu_5fed096c0efed965.webp"
width="760"
height="300"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The first gate, known as the forget gate, decides which information in the incoming long-term memory &lt;strong&gt;cell state&lt;/strong&gt; vector is important, and which should be dropped. To do so it takes the output from the previous step in the sequence, together with external input, and uses it to generate a &lt;strong&gt;forget vector&lt;/strong&gt;, with elements between 0 and 1. This vector is the same dimension as the cell state vector. The forget vector and cell state are multiplied together point-wise, which has the effect of removing information from the cell state, or long-term memory. In other words, the forget gate decides which pieces of the long-term memory should be forgotten, given the output of the proceeding hidden state and the current data in the input sequence.
The next gate, known as the &lt;strong&gt;memory network&lt;/strong&gt; gate (&lt;em&gt;New Memory Update Gate&lt;/em&gt; in picture), determines what new information should be added to the long term memory cell state.
To do so it uses the output from the previous hidden state together with the new input data to generate a &lt;strong&gt;new memory update&lt;/strong&gt; vector with both positive and negative elements. The new memory-update vector is added to the cell state, resulting in the long-term memory of the network being updated with information that depends on the new input data and the context given by the previous hidden state. In combination the &lt;em&gt;Forget&lt;/em&gt; and &lt;em&gt;new memory&lt;/em&gt; gates update the long term memory or &lt;em&gt;cell state&lt;/em&gt; of the network. The final &lt;em&gt;output&lt;/em&gt; gate then combines all of the data from the cell state, the input, and the output of the proceeding step to produce the output, which is passed along to the next step in the sequence together with the cell state.&lt;/p&gt;
&lt;h2 id="rnns-in-retail"&gt;RNNs in retail&lt;/h2&gt;
&lt;p&gt;We secretly experience the power of RNNs every day when we use auto-complete on our mobile phones, or when Google suggests search queries. The same properties that make RNNs ideal for language processing, however, also make them perfectly suited for tasks in retail and commerce such as customer sentiment analysis, calculating customer lifetime value, attribution analysis, and next purchase prediction, as well as in analyzing other consumer behaviors and interests. From the perspective of data processing, customer transaction histories, just like sentences, are sequences of `words’ with arbitrary length, and in which the ordering of words holds information. RNNs reduce the effort for feature analysis: they allow to feed in sequential data where otherwise onlz aggregated data would be usable - thereby also increasing the quality of the analysis as data aggregation always translates to a loss of information.
Take the example of a return forecast model, where you want to predict the likeliness of an ordered item to be returned. You can immediately write down a long list of different input information that should be relevant for this deduction. However, they come in two different types: On the one hand, you have a set of sequential data where you collect i.a. the return rate per past order of the customer. On top of that, you also have non-sequential, single information about the customer and the current order – like the time of the order or whether the customer subscribed to your newsletter. If you want to get the most out of your model, it should be able to process both types of data and it is the sequential data where RNNs come into play.
By now, you should have a big picture view of what RNNs are and roughly how they function. You may already be imagining intriguing new use cases for your own business. The applications in retail are really endless and down to your own imagination, with huge potential for creating a data driven, highly efficient business. If you have an application you would like to discuss, we will be happy to help bring your ideas to life. From analyzing transaction tables to customer classification and segmentation to making predictions based on customer online activity, RNNs provide a host of possibilities.&lt;/p&gt;</description></item><item><title>Conversion Delay: Marketing Performance</title><link>https://www.koehn.ai/en/blog/conversion-delay-marketing-performance/</link><pubDate>Sat, 09 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/conversion-delay-marketing-performance/</guid><description>&lt;p&gt;When it comes to quantifying the performance of marketing channels, the first thing that comes to mind is counting the orders per day that were placed per marketing channels and summing up their corresponding profit or revenue. To improve this direct approach, attribution models can be used to redistribute the impact of an order to the preceding interactions of the customer: The fact that the customer finally bought a product via marketing channel A is of course important, but so is the marketing channel B that caused the customer to start interacting with your shop after all – ultimately leading to spending money. Attribution models therefore reallocate (parts of) the revenue to the previous stations of the customer’s journey. This can be done either via attribution models that assign increased ratios to the first and last interaction(s), while giving less impact to those in the middle. Alternatively, dynamical attribution models determine these weights based on the data of all your customers, resulting in bespoke weights fitting their behaviour. If you are interested in more details on dynamical attribution models, you can read more in the corresponding separate Insights article on this blog.&lt;/p&gt;
&lt;h2 id="customer-journeys"&gt;Customer Journeys&lt;/h2&gt;
&lt;p&gt;Underlying these attribution models are the customer journeys, following certain rules like maximum length or whether they end after an order. This prescribed logics has direct influence on the attributed order shares / revenue: If a journey can have a maximum length of, say, 50 days, interactions of the last 50 may still get assigned a certain amount / revenue. If your journey logics allows for journeys with several consecutive orders, this holds even more. This circumstance is referred to as the
&lt;strong&gt;conversion delay&lt;/strong&gt; : some of yesterday’s interactions with your website may well only lead to revenue in the next upcoming days.
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Conversion Delay"
src="https://www.koehn.ai/media/blog/conversion_delay.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="conversion-delay"&gt;Conversion Delay&lt;/h2&gt;
&lt;p&gt;When you are interested in evaluating the overall impact of a marketing campaign, e.g., the attributed orders / revenue is already a good additional measurement. However, it can only consider orders that were already placed. If you want to monitor the daily performance of more recent days, too, you need to compensate for the conversion delay and with appropriate tools as well as suitable data, this is indeed possible!
The first idea of how to possibly fix the revenue gap due to the conversion delay is of course to use the historic rates of attributed revenue per interaction of the marketing channels. Knowing yesterday’s interactions per marketing channel, we can then estimate the revenue that is likely to be generated via these interactions over the next days. While this may already yield a reasonable result, it is not of much help when monitoring specific marketing campaigns where the customers’ behaviour deviates (as provoked!) from the usual one: the revenue per interaction is probably quite different on Black Friday than the average ratio and maybe even different enough before Christmas as compared to summer. The latter may be compensable by considering the average ratio of the last weeks only, but more temporarily limited scenarios like Black Friday still won’t be covered well enough.&lt;/p&gt;
&lt;h2 id="machine-learning"&gt;Machine Learning&lt;/h2&gt;
&lt;p&gt;This is where machine learning models come into play. These allow us to draw on more input data, enabling the model to derive, e.g., whether a special situation like Black Friday is present or whether your customers show seasonal behaviour. When it comes to data acquisition, generating the training data for such a model can become rather complex, especially if the model should also use monetary values as input data: These should not be the ones the attribution model provides as they rely on the “perfect knowledge” of all future orders within the next 50 days after the reference date. If we want the model to consider the attributed revenue of the respective last days – to derive whether we are currently in a phase of a high rate of revenue per interaction –, the model should be trained on these values the same way we know them when evaluating the model today. This means that for all days of the past, we need to acquire the attributed revenues of the respective last days as we would have known them back then, on that day.&lt;/p&gt;</description></item><item><title>Markov and Shapley: Marketing attribution modelling at interaction level or path level</title><link>https://www.koehn.ai/en/blog/dynamic-marketing-attribution-modelling-markov-chain-and-shapley-value/</link><pubDate>Sun, 17 Jan 2021 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/dynamic-marketing-attribution-modelling-markov-chain-and-shapley-value/</guid><description>&lt;p&gt;Markov chain and Shapley value: In the field of marketing,
&lt;strong&gt;first-click&lt;/strong&gt; ,
&lt;strong&gt;last-click&lt;/strong&gt; or multi-click models (
&lt;strong&gt;linear&lt;/strong&gt; or
&lt;strong&gt;bathtub&lt;/strong&gt; ) are frequently used as attribution models to measure the success - or profitability - of individual marketing channels (SEA, SEO, e-mail, etc.). What all these models have in common is that they divide the value of a conversion (a purchase) in a predefined way between the different steps in the list of a customer&amp;rsquo;s interactions. For example, if one uses a last-click model and the customer has purchased a product after clicking on a Facebook ad, the value of this conversion is attributed to the &amp;ldquo;Facebook&amp;rdquo; marketing channel, regardless of any previous interactions by the customer. In the case of multi-click models, the value of a conversion is allocated to all interactions associated with this purchase according to predefined weights. However, the weightings in all these models appear
&lt;strong&gt;ad-hoc&lt;/strong&gt; , as they are not based on precise data analysis, but are
&lt;strong&gt;determined manually&lt;/strong&gt; in advance. This is where the
&lt;strong&gt;dynamic attribution&lt;/strong&gt; models come in. Instead of assigning arbitrary weights to the interactions in advance, dynamic attribution models determine these weights independently based on the data provided. The
&lt;strong&gt;Markov model&lt;/strong&gt; and the
&lt;strong&gt;Shapley value model&lt;/strong&gt; are considered state-of-the-art models. Both will be discussed in more detail below. Both are designed to produce results on the level of channels. To obtain results at the
&lt;strong&gt;interaction level&lt;/strong&gt; or
&lt;strong&gt;path level&lt;/strong&gt; requires some extra work. The latter is not within the scope of this article, but we will be happy to help you with it. Feel free to contact us for rates, we can implement the Markov and Shapley models for your business on a short notice.&lt;/p&gt;
&lt;h2 id="markov-model"&gt;Markov model&lt;/h2&gt;
&lt;p&gt;The fundamental object in the Markov model on which the entire analysis is built is the
&lt;strong&gt;Markov graph&lt;/strong&gt; . For a given data set containing the
&lt;strong&gt;interaction paths&lt;/strong&gt; of different customers (e.g., Start -&amp;gt; Facebook -&amp;gt; Remarketing -&amp;gt; Conversion/Purchase), this can be constructed as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;All marketing channels in the data set as well as the terms &amp;ldquo;start&amp;rdquo;, &amp;ldquo;conversion&amp;rdquo; and &amp;ldquo;null&amp;rdquo; (no conversion) are written individually on an index card and then spread out on a flat surface.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now you go through the interaction paths of the individual customers and illustrate each of them by connecting the corresponding index cards with arrows. If we choose an example with a total of three marketing channels and four different interaction paths, the resulting graphic could look like this, for example:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Markov interaction paths"
src="https://www.koehn.ai/media/blog/Markov_paths.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then, for each marketing channel, count the number of arrows that lead to a fixed other marketing channel and divide this number by the total number of arrows starting from this node. In the example above, you get:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Markov transition probabilities"
src="https://www.koehn.ai/media/blog/Markov_ratios.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Since out of three arrows starting from the Facebook channel, two point in the direction of Google and one in the direction of remarketing, you get the numbers 2/3 and 1/3. These numbers represent the so-called
&lt;strong&gt;transition probabilities&lt;/strong&gt; , i.e. for a customer who has just clicked on a Facebook ad, the probability is 2/3 that the next stop in his interaction path is Google, while the probability is that the next stop is Remarketing is 1/3.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The last step is to calculate the overall probability of a conversion. In the above example, there are three Markov paths that lead from the starting point to a conversion. For example, if we look at the path Start -&amp;gt; Facebook -&amp;gt; Remarketing -&amp;gt; Conversion, we get 3/4 _ 1/3 _ 2/3 = 1/6 for its probability. Correspondingly, the other two paths are 1/9 and 2/9 respectively, so that the total probability of a conversion is 1/6 + 1/9 + 2/9 = 1/2. To quantify the success of the individual marketing channels, each one of the three marketing
&lt;strong&gt;channels&lt;/strong&gt; is now
&lt;strong&gt;removed in turn&lt;/strong&gt; from the Markov graph and the calculation repeated. The success of the channel is then calculated using the formula
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Markov Formula 1"
srcset="https://www.koehn.ai/media/blog/formula1_hu_512b690e301c7f20.webp 279w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/formula1_hu_512b690e301c7f20.webp"
width="279"
height="56"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Even without explicitly following the mathematical explanations, it is intuitively clear that the above Markov graph can be used to
&lt;strong&gt;sort the marketing channels according to importance&lt;/strong&gt; . If, for example, the remarketing channel is removed, none of the three converting Markov paths remain. This channel is therefore essential in the example discussed here. If, on the other hand, Facebook or Google are removed, one converting Markov path remains in each case. These two channels are therefore somewhat less important in comparison. In this way, the success of individual marketing channels can be precisely determined on the basis of customer data,
&lt;strong&gt;without having to make further assumptions in advance&lt;/strong&gt; .&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="shapley-value-model"&gt;Shapley value model&lt;/h2&gt;
&lt;p&gt;An alternative to the Markov model is the Shapley value model. The Shapley value is a concept that belongs to the mathematical subfield of
&lt;strong&gt;game theory&lt;/strong&gt; . The basic problem solved by the Shapley value is to
&lt;strong&gt;distribute profits fairly&lt;/strong&gt; within a game in which players can form
&lt;strong&gt;coalitions&lt;/strong&gt; . However, the concept of Shapley value can also be applied to the attribution problem. Here, the different marketing channels are seen as players who typically interact in a customer&amp;rsquo;s interaction path, i.e., form a coalition. The
&lt;strong&gt;conversion rate&lt;/strong&gt; , for example, can be used as the profit to be distributed. This is determined from the customer data by counting the number of conversions (and non-conversions) for each theoretically possible interaction path. The number of conversions is then set into relation with the overal number of appearances of this interaction paths, i.e. the quotient (number of conversions) / (number of conversions + number of non-conversions) is computed. Put simply, the Shapley value model quantifies the impact of a particular marketing channel by
&lt;strong&gt;comparing&lt;/strong&gt; interaction paths that differ only in the
&lt;strong&gt;presence or absence&lt;/strong&gt; of the
&lt;strong&gt;channel&lt;/strong&gt; under consideration. To illustrate the point, consider the following examples:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="High Shapley value"
src="https://www.koehn.ai/media/blog/Shapley_high_impact.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Both interaction paths obviously differed only by the presence of the &amp;ldquo;Video Branding&amp;rdquo; channel. However, while the upper interaction path has a conversion rate of 10%, the lower path only has a conversion rate of 6%. The &amp;ldquo;Video Branding&amp;rdquo; channel thus
&lt;strong&gt;increases the conversion rate&lt;/strong&gt; by
&lt;strong&gt;about 67%&lt;/strong&gt; in relative terms (4% in absolute terms) and it receives a high Shapley value as a result, since it generates
&lt;strong&gt;substantial added value&lt;/strong&gt; . In the second example, the situation is exactly the opposite:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Low Shapley value"
src="https://www.koehn.ai/media/blog/Shapley_low_impact.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
In relative terms, the &amp;ldquo;Display&amp;rdquo; channel obviously
&lt;strong&gt;only&lt;/strong&gt; ensures an increase in the conversion rate of
&lt;strong&gt;around 2%&lt;/strong&gt; (0.2% absolute). The Shapley value of the &amp;ldquo;Display&amp;rdquo; channel is therefore significantly lower than that of the &amp;ldquo;Video Branding&amp;rdquo; channel, as the added value generated by this channel must be regarded as
&lt;strong&gt;marginal&lt;/strong&gt; .
In the following, the exact definition of the Shapley value will now be discussed. In mathematical terms, the Shapley value for the individual marketing channels is determined using the following formula:
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Shapley Formula 2"
srcset="https://www.koehn.ai/media/blog/formula2_hu_de6988b6668b9a35.webp 320w, https://www.koehn.ai/media/blog/formula2_hu_62795b0d318bdca9.webp 480w, https://www.koehn.ai/media/blog/formula2_hu_68e0a6eb8f3aecb6.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/formula2_hu_de6988b6668b9a35.webp"
width="760"
height="61"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Here, the marginal contribution of channel i to a coalition is defined as the difference between the profit that a coalition S generates together with channel i and the profit it generates without channel i, i.e.
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Shapley Formula 3"
srcset="https://www.koehn.ai/media/blog/formula3_hu_a8bde1c37b784809.webp 320w, https://www.koehn.ai/media/blog/formula3_hu_76123877157fb2c1.webp 480w, https://www.koehn.ai/media/blog/formula3_hu_22e101d6a55f8b46.webp 669w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/formula3_hu_a8bde1c37b784809.webp"
width="669"
height="42"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Here, G is the
&lt;strong&gt;profit function&lt;/strong&gt; and S is a combination of marketing channels which does not include channel i. So in the above examples, the marginal profit is given exactly by the differences of the conversion rates, i.e. 4% in the first example and 0.2% in the second example. However, to calculate the actual Shapley value of a channel, not only one interaction path is considered. Rather, the Shapley value is determined by calculating the marginal contribution of the channel under consideration for all possible coalitions and then taking the
&lt;strong&gt;average&lt;/strong&gt; . Thus, the other factors in the previously stated formula only ensure that the average is correct. In other words, the Shapley value reflects the average added value generated by a marketing channel.
One subtlety in the Shapley value model concerns the profit function G. This is
&lt;strong&gt;not predetermined&lt;/strong&gt; by the definition of the Shapley value but can be
&lt;strong&gt;determined independently&lt;/strong&gt; . In the examples given, the conversion rate was defined as the profit in the sense of the Shapley value. Alternatively, however, the
&lt;strong&gt;net revenue&lt;/strong&gt; generated by the conversions can also be used as the Shapley profit. Often, the latter version is a suitable choice. If the primary focus is on determining the cost-to-sales ratio, for example, the net revenue is in fact the necessary quantity. However, an adjustment of the profit function is possible at any time and a comparative analysis regarding different profit functions can generate further valuable insights.&lt;/p&gt;
&lt;h2 id="summary"&gt;Summary&lt;/h2&gt;
&lt;p&gt;The
&lt;strong&gt;primary advantage&lt;/strong&gt; of dynamic attribution models is that they produce
&lt;strong&gt;more accurate results&lt;/strong&gt; than the heuristic models, which include the Bathtub model. The reason for this is that both the Markov and Shapley value models do not perform their calculations using arbitrarily determined weights but
&lt;strong&gt;determine the weights&lt;/strong&gt; of the steps in the interaction paths
&lt;strong&gt;independently on the basis of the data&lt;/strong&gt; . Consequently, they eliminate human influence on the analysis and are therefore
&lt;strong&gt;clearly superior&lt;/strong&gt; to heuristic models. In particular, when it comes to calculating the cost-to-sales ratio for very expensive marketing channels such as
&lt;strong&gt;Search Engine Advertising (SEA)&lt;/strong&gt; , the use of models with the highest precision seems almost imperative, as any misjudgement can lead to
&lt;strong&gt;unnecessarily high follow-up costs&lt;/strong&gt; .&lt;/p&gt;</description></item><item><title>MLOps (Machine-Learning DevOps)</title><link>https://www.koehn.ai/en/blog/mlops-machine-learning-devops/</link><pubDate>Fri, 06 Nov 2020 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/mlops-machine-learning-devops/</guid><description>&lt;p&gt;Deploying machine-learning models takes about 25% of data scientists&amp;rsquo; time, while 75% of models never go beyond the experimental phase, resulting in a significant
&lt;strong&gt;productivity bottleneck&lt;/strong&gt; . Automated deployment and retraining processes decrease the
&lt;strong&gt;time to market&lt;/strong&gt; and
&lt;strong&gt;reduce operations cost&lt;/strong&gt; . This is the subject of machine-learning operations - or in short MLOps. MLOps is an
&lt;strong&gt;extrapolation of the DevOps&lt;/strong&gt; approach to include the machine-learning modelling life cycle. Models degrade over time because the input changes. MLOps introduces
&lt;strong&gt;continuous retraining, model monitoring and evaluation of performance&lt;/strong&gt; . It saves a version history not only of code, but also of data and models. Versioning of data allows data scientists to keep track of where their data came from, and versioning of models allows to efficiently keep track of the model quality in the development process. Note that MLOps is not to be confused with AIOps, which merely augments the DevOps framework with AI techniques.
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="MLOps (Machine-Learning DevOps)"
src="https://www.koehn.ai/media/blog/mlops-machine-learning-devops.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="data-scientists-pain-points"&gt;Data scientists&amp;rsquo; pain points&lt;/h2&gt;
&lt;p&gt;Data scientists will tell you that their productivity is largely impaired by manually having to keep track of&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;machine-learning models,&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;code versions,&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;hyperparameters,&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;metrics,&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ideas tried, and whether they worked or failed.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They will have trouble pinpointing the best model that had been trained two weeks prior, in order to reproduce it and to run it on full production data, or to rerun it with a more thorough parameter sweep.&lt;/p&gt;
&lt;h2 id="from-devops-to-mlops"&gt;From DevOps to MLOps&lt;/h2&gt;
&lt;p&gt;MLOps expands the DevOps integration stage with data &amp;amp; model validation. It expands delivery with the complexity of ML deployment. The team shall be able to successfully train a model and make it ready for production usage in a streamlined fashion, thereby significantly improving performance &amp;amp; agility. When in production, models need to be updated on a regular basis as new data comes in. Updates and changes need to be traceable. Continuous training of ML models has to encompass the whole
&lt;strong&gt;model life cycle&lt;/strong&gt; :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Model training pipeline (TFX, MLflow, Pachyderm, Kubeflow)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Model Registry (e.g. platforms such as Data Bricks or Google)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Model Serving (Deployment)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Model Monitoring&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CI/CD orchestration&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Instead of simply training offline and then deploying into production, a multistep pipeline to automatically retrain and deploy models is put in place. Automatic restart of training cycles can be triggered either as scheduled, when new data arrives, when there is a difference between training and live data, or when a degradation in model performance is observed. Summary statistics will be tracked and notifications sent out or models rolled back when values deviate from expectations.&lt;/p&gt;
&lt;h2 id="summary"&gt;Summary&lt;/h2&gt;
&lt;p&gt;The machine-learning product development process is not only about a software package. Beyond unit-testing of methods and functions, it requires validation of data, parameters and code together in a system. Machine learning is experimental in nature. The MLOps concept expands DevOps with specific processes that help data scientists to not get lost in the model zoo or in a swamp of deployment issues.&lt;/p&gt;</description></item><item><title>Yes, but what *is* Artificial Intelligence?</title><link>https://www.koehn.ai/en/blog/what-is-artificial-intelligence/</link><pubDate>Mon, 12 Oct 2020 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/what-is-artificial-intelligence/</guid><description>&lt;p&gt;In most cases, not actually much beyond a function fit.&lt;/p&gt;
&lt;h2 id="a-simple-example"&gt;A simple example&lt;/h2&gt;
&lt;p&gt;Let us take a look at one of the simplest examples - an example so simple that you might feel fooled. Imagine you have a list of twenty apartments, containing information about price and size of each apartment. You decide to create a two-dimensional diagram, with axes labeled &amp;ldquo;price&amp;rdquo; and &amp;ldquo;size&amp;rdquo;, respectively. Within this diagram, you mark one tick for every apartment on the list, with coordinates given by its price and size. You might observe that the price is generally increasing with larger size. Now you draw a line through your diagram in an optimal way. Optimal might mean here that the distances between data point and line are as small as possible on average. Your newly drawn line gives you a prediction for the price of any apartment based on its size. You can tell a computer to find that optimal line based on your list of apartments. A suitable algorithm takes some initial line and evolves it step by step towards the optimal line. This process of convergence constitutes the essence of machine learning, and machine learning is how AI is approached these days.
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Yes, but what is Artificial Intelligence?"
srcset="https://www.koehn.ai/media/blog/what-is-artificial-intelligence_hu_69357eba289c2750.webp 320w, https://www.koehn.ai/media/blog/what-is-artificial-intelligence_hu_130fc223dd5f0915.webp 378w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/what-is-artificial-intelligence_hu_69357eba289c2750.webp"
width="378"
height="353"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="a-more-realistic-fit"&gt;A more realistic fit&lt;/h2&gt;
&lt;p&gt;A straight line is a strong restriction on the function fit. A strong restriction makes learning easier, but a straight line can only cover linear dependencies and this is in most cases just too restrictive. It underfits the more interesting dependencies. What the computer draws does not have to be a line, it could also be curved. The meaning of optimal then needs to be reassessed. With a curve, it is possible to directly connect all the ticks, rendering the average distance between data and curve zero. Although the average distance is zero, this curve is not necessarily optimal. For example, your list of apartments might contain one highly unusual sample, leading to correnspondingly unusual predictions for the prices of other apartments of the same size. This is called overfitting. Note that the clustering of similar apartments according to what is called an unsupervised algorithm also fits within this picture. Striking the right balance between underfitting and overfitting is an engineering problem, as is the distinction between supervised and unsupervised learning.&lt;/p&gt;
&lt;h2 id="more-realistic-scenarios"&gt;More realistic scenarios&lt;/h2&gt;
&lt;p&gt;Expecting the apartment price to depend only on its size is way too naive. What about its location, architecture, facilities, nearby infrastructure? Each apartment has a long list of properties, and many of them act as features for the pricing prediction. If we repeat the above process, every one of these features will require its own axis. Needless to state, we are unable to bijectively draw anything beyond two dimensions, and to imagine anything beyond three. But we might need a hundred dimensions. Making a prediction of price based on size and quality level requires us to draw a surface instead of a curve. Taking into account more than two features would require us to draw the higher-dimensional analog of a surface if we could. We can&amp;rsquo;t, hence they are called hypersurfaces. The problems humans have with imagining a high number of dimensions do not exist for computers - the computer is pragmatic and treats a further dimension merely as one further element in a list of numbers. There is one big problem however.&lt;/p&gt;
&lt;h2 id="what-is-the-algorithm-for-optimizing-on-a-high-dimensional-feature-space"&gt;What is the algorithm for optimizing on a high-dimensional feature space?&lt;/h2&gt;
&lt;p&gt;Computation time generally grows exponentially with increasing number of dimensions. Each one of the pixels of an image in a computer-vision problem could constitute its own dimension in feature space. The number of words in the vocabulary of a natural-language processing problem would map to the number of dimensions in feature space. Hence, efficient algorithms are needed. In an effort to reduce computational complexity, physicists create simplified models that need to be just complex enough to capture the relevant effects. Should it later turn out that not all relevant effects are mapped, a new and more complex model is needed. (Note that a more complex model can &lt;em&gt;look&lt;/em&gt; simpler by the style of its formulation, reflecting a sense of logical completeness up to a certain degree.) Ranging from linear and logistic regression to very deep neural networks, the space of machine-learning models is vast. The properties of all these different models are discussed elsewhere. In essence though, the idea is always the same. Give the model just enough structure to be able to learn what it should. Give it eyes if you want it to see and give it ears if you want it to hear. But don&amp;rsquo;t give it more structure than necessary, otherwise you&amp;rsquo;ll be off the fine line between conceptual progress and present-day computational feasibility.&lt;/p&gt;</description></item><item><title>Machine Learning and Football</title><link>https://www.koehn.ai/en/blog/machine-learning-football/</link><pubDate>Wed, 02 Sep 2020 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/machine-learning-football/</guid><description>&lt;p&gt;Up until 15 years ago, football was completely reliant on instinct and intuition. This changed with the then younger generation of so-called laptop coaches. The term itself signifies the drastic change of paradigm. Whereas before, choices were made mainly on gut feeling and professional experience, it now became possible to base decisions on data. One prominent early example being the little note passed on to goalkeeper Jens Lehmann right before the penalty shoot-out of Germany vs Argentina in the WC 2006.&lt;/p&gt;
&lt;h2 id="an-abundance-of-data-in-professional-football"&gt;An abundance of data in professional football&lt;/h2&gt;
&lt;p&gt;These days, there is an abundance of data in professional football.
Sportec Solutions
, a subsidiary of
DFL
, produces about 3 million data points per match. 25 times per second, a range of features are tracked for all 22 players on the pitch. Features include amongst others the coordinates of player and ball. Manually created sets of event data additionally provide information about corner kicks, successful and missed shots on targets, bookings, and much more. Data sets like these are being sold to TV broadcasters and clubs.
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Machine Learning and Football (Photo by Bence Balla-Schottner on Unsplash)"
srcset="https://www.koehn.ai/media/blog/machine-learning-football_hu_b7d0000dd0186666.webp 320w, https://www.koehn.ai/media/blog/machine-learning-football_hu_73d11eeeeedf0e57.webp 387w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/machine-learning-football_hu_b7d0000dd0186666.webp"
width="387"
height="332"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="generating-tracking-data"&gt;Generating tracking data&lt;/h2&gt;
&lt;p&gt;Companies such as Sportec Solutions have access to special cameras placed in suitable spots around the pitch that in principle allow for a precise tracking of ball and players. This setup has its limitations: the data sets feature a significant level of noise and the accuracy is not high enough to meaningfully study ball trajectories such as swerve and acceleration. The position of extremities and vertical coordinates of players are not recorded. In principle, anyone can start producing data about football matches from suitable broadcasting images - albeit projected onto two dimensions, most of the information is there. Obviously, this task can not be done manually and calls for computer-vision techniques. The startup company
Subsequent
is implementing suitable services in an automated fashion using state-of-the-art techniques.&lt;/p&gt;
&lt;h2 id="use-cases"&gt;Use Cases&lt;/h2&gt;
&lt;p&gt;The tracking and event data can be used for a wide range of use cases. Insights can be supplied to coaches and analysts at a glance via accessible dashboards with tangible illustrations. On the one hand, these include the derivation of direct statistics about individual players, groups of players or the team as a whole. These are simple aggregate statistics such as the ones you are probably used to seeing on TV, including success rates of passes, tackles, shots, each for the team as a whole and for individual players. Beyond that, it can be very insightful to construct more abstract statistics, such as goalie metrics, effectiveness of passes, the infamous packing rates, or statistics about set pieces.&lt;/p&gt;
&lt;h2 id="machine-learning-in-professional-football"&gt;Machine Learning in Professional Football&lt;/h2&gt;
&lt;p&gt;The next level of insights will be generated via machine-learning techniques. The first glimpse of what might arrive in the not too distant future is given by the
expected goal values xG
which will be featured in TV broadcasting from season 20/21. Any shot of the current match will be compared against the history of all similar shots that the machine-learning model is trained with. The model setup includes amongst other properties the position of the shot taker and the opponent pressure. But machine learning enables many further use cases. For instance, detecting complex patterns automatically will save the match analysts great amounts of time which they can invest in other topics. Let us focus on a specific example.&lt;/p&gt;
&lt;h2 id="automated-tactical-analysis-of-team-behavior"&gt;Automated tactical analysis of team behavior&lt;/h2&gt;
&lt;p&gt;It is a very time-consuming task for analysts to watch scenes of matches and take note of the tactical variants played by an opponent. In the case of set pieces, this includes the initial line-up as well as players&amp;rsquo; trajectories in anticipation of the delivery of the set piece. Based on tracking data, state-of-the-art machine-learning algorithms can perform this process automatically. Technically, this can be solved by encoding the spatio-temporal coordinate trajectories of all players using a combination of convolutional and recurrent neural networks, compressing the high-dimensional information about all the players&amp;rsquo; coordinates into a lower-dimensional latent space via the
autoencoder technique
and subsequently running a clustering algorithm on the latent space.&lt;/p&gt;
&lt;h2 id="defensive-advice-board"&gt;Defensive Advice Board&lt;/h2&gt;
&lt;p&gt;The goal is to have the system cluster similar set-piece strategies together and to set up a cluster profile for each opponent. Via a suitable dashboard visualization, such a cluster profile enables the coach to tell at a glance which set-piece strategies have been conducted by the opponent and at which frequency. The analysis can be based on a user-defined time frame, but it can also detect pattern changes during the course of a season, e.g. due to the installment of a new head coach or injury of key players.&lt;/p&gt;
&lt;h2 id="opponent-behavior-simulation"&gt;Opponent Behavior Simulation&lt;/h2&gt;
&lt;p&gt;A further emerging technique is given by the
ghosting method
. This approached is based on LSTM networks and Imitation Learning and serves to illustrate the behavior of specific or of averaged teams with respect to concrete set-piece scenarios. This method enables automated answering of questions such as &amp;ldquo;how would team X defend against offensive strategy Y, and how will this influence the set piece’s xG value?&amp;rdquo;&lt;/p&gt;
&lt;h2 id="outlook"&gt;Outlook&lt;/h2&gt;
&lt;p&gt;In spite of being conceptually simple, football is an enormously complex game to optimize. While insights from machine learning won&amp;rsquo;t ever be able to make up for lack of motivation or character in a team, they will definitely change the way the game is played over the years to come. We will see playing strategies converge towards an overall higher degree of efficiency. The bottom-up approach for how to act locally in order to achieve a common outcome will be replaced by stringent instructions derived top-down. Other team sports such as handball or basketball will also profit from these advancements.&lt;/p&gt;</description></item><item><title>Online MBA Digital &amp; AI</title><link>https://www.koehn.ai/en/blog/online-mba-digital-ai/</link><pubDate>Mon, 17 Aug 2020 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/online-mba-digital-ai/</guid><description>&lt;p&gt;Earning an MBA degree can be beneficial for people with a technical degree. It entails however not only a time investment, but also a significant financial burden. Self-study constitutes an excellent alternative. All the material for the courses linked below are available at no cost.
The reputation of a business school depends on their alumni&amp;rsquo;s career success. This means they might be selective on admissions even if you are willing to make that investment. Tuition fees can be up to about 150.000 EUR, in addition students miss out on their regular salary during a full-time programme. In many cases, the student&amp;rsquo;s employer pays a significant fraction of the tuition fees. In contrast to self-study, the big advantage of real MBA programmes is the business network which you get on top.
Curricula of renowned business schools such as the
Wharton School
of the
University of Pennsylvania
consist usually of a fixed and a flexible core. The curriculum presented here is similar to that, plus it specializes on Digital &amp;amp; AI. The table below contains web links to online versions of courses at UPenn and similar institutions. If you allocate evening or weekend time for self-study, plan one to two weeks per course.&lt;/p&gt;
&lt;h2 id="fixed-core"&gt;Fixed Core&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Course Name &amp;amp; Link&lt;/th&gt;
&lt;th&gt;Instructor&lt;/th&gt;
&lt;th&gt;Affiliation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Rebecca Stein&lt;/td&gt;
&lt;td&gt;University of Pennsylvania Wharton&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Andrew Conway&lt;/td&gt;
&lt;td&gt;Princeton University&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Barbara E. Kahn Peter Fader Jagmohan Raju&lt;/td&gt;
&lt;td&gt;University of Pennsylvania&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Christian Terwiesch&lt;/td&gt;
&lt;td&gt;University of Pennsylvania&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Matt McGarrity&lt;/td&gt;
&lt;td&gt;University of Washington&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Denise Comer&lt;/td&gt;
&lt;td&gt;Duke University&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Richard Boyatzis&lt;/td&gt;
&lt;td&gt;Case Western Reserve University&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="flexible-core"&gt;Flexible Core&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Course Name &amp;amp; Link&lt;/th&gt;
&lt;th&gt;Instructor&lt;/th&gt;
&lt;th&gt;Affiliation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Brian J Bushee&lt;/td&gt;
&lt;td&gt;University of Pennsylvania Wharton&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Michael R Roberts&lt;/td&gt;
&lt;td&gt;University of Pennsylvania Wharton&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Peter Navarro&lt;/td&gt;
&lt;td&gt;University of California, Irvine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Jeffrey Sachs&lt;/td&gt;
&lt;td&gt;Columbia University&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Michael Goldberg&lt;/td&gt;
&lt;td&gt;Case Western Reserve University&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Rolf Strom-Olsen&lt;/td&gt;
&lt;td&gt;IE Business School&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Michael Lenox Jared Harris&lt;/td&gt;
&lt;td&gt;University of Virginia&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Thomas Zoëga Ramsøy&lt;/td&gt;
&lt;td&gt;Copenhagen Business School&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Udatta Palekar&lt;/td&gt;
&lt;td&gt;University of Illinois&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Gad Allon Jan A. Van Mieghem&lt;/td&gt;
&lt;td&gt;University of Illinois&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Walter Sinnot-Armstrong Ram Neta&lt;/td&gt;
&lt;td&gt;Duke University&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;George Siedel&lt;/td&gt;
&lt;td&gt;University of Michigan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Robert Shiller&lt;/td&gt;
&lt;td&gt;Yale University&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;John Mullins&lt;/td&gt;
&lt;td&gt;London Business School&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Richard Waterman&lt;/td&gt;
&lt;td&gt;University of Pennsylvania Wharton&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Richard Lambert Robert W. Holthausen&lt;/td&gt;
&lt;td&gt;University of Pennsylvania Wharton&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Sergei Savin Senthil Veeraraghavan&lt;/td&gt;
&lt;td&gt;University of Pennsylvania Wharton&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Lori Rosenkopf Karl T. Ulrich Ethan Mollick Kartik Hosanagar David Hsu&lt;/td&gt;
&lt;td&gt;University of Pennsylvania Wharton&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Eric Bradlow, Peter Fader, Raghu Iyengar, Ron Berman, Senthil Veeraraghavan, Sergei Savin, Noah Gans, Cade Massey, Martine Haas, Matthew Bidwell, Brian J Bushee, Christopher D. Ittner&lt;/td&gt;
&lt;td&gt;University of Pennsylvania Wharton&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="digital--ai-specialization"&gt;Digital &amp;amp; AI Specialization&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Course Name &amp;amp; Link&lt;/th&gt;
&lt;th&gt;Instructor&lt;/th&gt;
&lt;th&gt;Affiliation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Randy Hlavac&lt;/td&gt;
&lt;td&gt;Northwestern University&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Santiago Gallino Antonio Moreno-Garcia&lt;/td&gt;
&lt;td&gt;Dartmouth University&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;John Lavine Candy Lee Randy Hlavac&lt;/td&gt;
&lt;td&gt;Northwestern University&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Tim Peters&lt;/td&gt;
&lt;td&gt;University of California, Berkeley&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Stephan Sorger&lt;/td&gt;
&lt;td&gt;University of California, Berkeley&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Kamel Jedidi Asim Ansari&lt;/td&gt;
&lt;td&gt;Columbia University&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Igor Halperin&lt;/td&gt;
&lt;td&gt;New York University&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;/td&gt;
&lt;td&gt;Christopher Geczy&lt;/td&gt;
&lt;td&gt;University of Pennsylvania Wharton&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</description></item><item><title>Deep Learning Workstation</title><link>https://www.koehn.ai/en/blog/deep-learning-workstation-2020/</link><pubDate>Sun, 21 Jun 2020 00:00:00 +0000</pubDate><guid>https://www.koehn.ai/en/blog/deep-learning-workstation-2020/</guid><description>&lt;p&gt;Computing on cloud infrastructure is readily available with pre-constructed components and offers many operational advantages. The list of notable providers includes amongst others Amazon Web Services, Google Cloud Platform and Microsoft Azure. In many practical situations, it is nevertheless useful or even essential to have hardware on premises. This guide lists a few advantages of having a workstation on-premises, and it shall get you jumpstarted with ideas for what to buy in 2020, keeping in mind availability and pricing structure.&lt;/p&gt;
&lt;h2 id="when-to-prefer-a-local-workstation"&gt;When to prefer a local workstation&lt;/h2&gt;
&lt;p&gt;Firstly,
cost. Putting the benefit of scaling flexibility in cloud infrastructure aside, performing some serious deep-learning tasks can easily lead you into the four-figure range. In practice, this limits creativity because experiments are expensive. The break-even point for the profitability of a local workstation in comparison to cloud usage is reached rather rapid, usually after a few months.
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Deep Learning Workstation"
srcset="https://www.koehn.ai/media/blog/deep-learning-workstation-2020_hu_9f787ea573212edc.webp 320w, https://www.koehn.ai/media/blog/deep-learning-workstation-2020_hu_b943aa184297091e.webp 387w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://www.koehn.ai/media/blog/deep-learning-workstation-2020_hu_9f787ea573212edc.webp"
width="387"
height="514"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
Secondly,
being connected to a computing instance via SSH or web portal is less comfortable for the daily workflow than being connected to your local workstation. Lags and connection drops are the daily reality for almost all users.
Thirdly,
computing on cloud servers automatically means storing your data on the cloud provider&amp;rsquo;s servers. Depending on the level of sensitivity of the data to be analyzed, this may be undesirable or even illegal. The unavailability of data due to such issues is a limiting factor for creativity and rapid prototyping.&lt;/p&gt;
&lt;h2 id="hardware-components"&gt;Hardware Components&lt;/h2&gt;
&lt;p&gt;A workstation composed from the following list of components allows you to perform state-of-the-art research projects at a reasonable price in 2020. Note that assembly is an interesting part of the process. It will take an expert roughly 15 minutes, a hobbyist will need two hours. People without prior experience should set aside a weekend.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Workstation case:&lt;/strong&gt; As physical dimensions usually are no limiting factor in this setting, we recommend a workstation case that respects the E-ATX standard. Note that the chosen size standard affects the options for choice of main board. Good choice: Corsair Carbide Air 540.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Power adaptor:&lt;/strong&gt; The graphics card(s) will consume a lot of power. Depending on the number of cards to be installed, the power supply needs to be able to supply a sufficient amount of power. Otherwise, you&amp;rsquo;ll be at risk of sudden power losses during work. If you want to be on the safe side with respect to future extensions, get a 1600W power supply. A higher quality certification will save a considerable amount of energy in daily use. Good choice: Super Flower Leadex 80 PLUS Platinum 1600W.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Mainboard:&lt;/strong&gt; Get a very reliable workstation-class mainboard without multimedia frills but with evenly spaced PCI slots so that all your graphics cards fit in well. Note the standards: X299 for Intel processors, X399 for AMD processors. Good choice: Asus WS X299 SAGE.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;CPU:&lt;/strong&gt; Your choice: Intel or AMD. The advantage of AMD&amp;rsquo;s processors is that they are cheaper and feature more threads. Intel&amp;rsquo;s processors have a higher single-thread performance. Check out the new processors with VNNI. Note that Cascade Lake processors may require you to flash your main board&amp;rsquo;s BIOS beforehands. Depending on the type of main board, this can be done without a CPU installed. Good choice: Intel Core i9-10920X.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;CPU cooler:&lt;/strong&gt; A suitable cooling system to attach to your CPU. Good choice: Corsair Cooling Hydro Series H100i Platinum.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;RAM:&lt;/strong&gt; Get 8x 16GB RAM DDR4. If you&amp;rsquo;re running an Intel CPU, cheap RAM will suffice. Good choice: 8x G.SKILL RipJaws V 16GB DDR4-3200 CL16 DIMM.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Hard drive(s):&lt;/strong&gt; One 1TB NVMe SSD drive for operating system and scratch plus two large magnetic hard drives for storage. Good choice: 1x SSD 1TB Samsung M.2 PCI-E NVMe 970 EVO Plus, 2x Seagate BarraCuda SATA 6G, 7200 U/min, 2 TB.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Graphics card(s):&lt;/strong&gt; In 2020, we recommend one to four RTX 2080 Ti. These cards are being offered by a range of vendors, it doesn&amp;rsquo;t much matter which one you choose. Adding a second card will not double the performance, but increase it roughly by half. To manage the heat inside the case, a blower-style fan version has to be selected if the workstation is to contain more than one card. Good choice: 1-4x ASUS GeForce RTX 2080 Ti Turbo 11G.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Screen cables:&lt;/strong&gt; Suitable choice of HDMI and DisplayPort cables, depending on the configuration and number of screens to be connected. Note that the ASUS card features 2x DisplayPort and 1x HDMI.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Screen(s):&lt;/strong&gt; One to three screens, each between 20 and 27 inches diagonal.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Peripherals:&lt;/strong&gt; Such as keyboard, mouse and USB hub.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Operating system and software:&lt;/strong&gt; Windows 10 and Linux are the candidates. Good choice: Download a recent version of Ubuntu Linux and boot it from a USB stick. Installation is a simple process. Afterwards, install all the required components from the Ubuntu&amp;rsquo;s repositories and the pip package manager, such as compilers, interpreters, Python package managers, your IDE of choice, TensorFlow, Keras, PyTorch, cloud platform SDK and of course the Midnight Commander. For remote access, set up SSH for command line access and xRDP via SSH tunnel for remote graphical access.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The total cost of this system will vary between EUR 4000 and 7000 depending on the number of GPUs included. The assembly of the parts will pose no insurmountable obstacle to any experienced server administrator.&lt;/p&gt;</description></item></channel></rss>